Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22311

$cli->output won't output the first time with ob_end_flush();

    XMLWordPrintable

Details

    Description

      If you try to run a

      php ezpublish/console --env=prod ezpublish:legacy:script  
      

      on a script that doesn't start by calling the ob_end_flush(); method, the first $cli->output won't appear.

      Steps:

      Add a test.php file inside ezpublish_legacy folder with the following content

      #!/usr/bin/env php
      <?php
      ob_end_flush();
      require_once 'autoload.php';
      
      $cli = eZCLI::instance();
      
      $cli->output( "First test" );
      $cli->output( "Second test" );
      

      The resulting

      Attachments

        Activity

          People

            Unassigned Unassigned
            pedro.resende-obsolete@ez.no Pedro Resende (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: