Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10149

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.0.9-RC1
    • None
    • None
    • None
    • Apache/2.2.17 (Win32) PHP/5.3.4,MySQL/5.5.8

      				
      $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

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

              Created:
              Updated:
              Resolved: