Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10149

deregister_globals causes error when cookie called GLOBALS is set to scalar value

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.9-RC1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Apache/2.2.17 (Win32) PHP/5.3.4,MySQL/5.5.8

      Description

      				
      $cookie = &$_COOKIE;
      while (isset($cookie['GLOBALS']))
      {
        foreach ($cookie['GLOBALS'] as $registered_var => $value)
        {     
          if(!isset($not_unset[$registered_var]))                       
          {		
            unset($GLOBALS[$registered_var]);
          }
        }
        $cookie = &$cookie['GLOBALS'];
      }               
      

      These code inside function deregister_globals() in common.php.
      I add code

      setcookie('GLOBALS', 'TEST');
      deregister_globals();
      

      to test function deregister_globals(),and the firefox show
      Fatal error: Cannot create references to/from string offsets nor overloaded objects in D:\workspace\phpbb\common.php on line 89

        Attachments

          Activity

            People

            • Assignee:
              naderman Nils Adermann
              Reporter:
              workschen workschen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: