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

Variable scope global in 3.9.2

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Medium Medium
    • None
    • 3.10.0alpha1, 3.9.2
    • Cronjobs
    • None

    Description

      The global variable scope doesn't work with 3.9.2

      At the root of the eZ publish install create a file test.php

      <?php
      $a = 1;
      $b = 2;
      
      function Sum()
      {
          global $a, $b;
      
          $b = $a + $b;
      }
      
      Sum();
      echo $b;
      ?> 
      

      run php test.php
      You got 3

      Replace the content of cronjobs/workflow.php by the same piece of code
      run php runcronjobs.php frequent
      You got 2 !!!
      If you do the same test with eZ publish 3.9.0 or 3.9.1 you have the correct answer (3)
      What happened to the global scope of a php variable in eZ 3.9.2 (it doesn't work either with latest svn code)!!!

      Steps to reproduce

      See above

      Attachments

        Activity

          People

            oms Ole Marius Smestad
            eberhardja eberhardja
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: