Bug #66827 [NEW]: session_start generates PHP Notice if session cookie contains array

From: Date: Wed, 05 Mar 2014 15:07:36 +0000
Subject: Bug #66827 [NEW]: session_start generates PHP Notice if session cookie contains array
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184533@lists.php.net to get a copy of this message
From: spam at krol dot me Operating system: osx PHP version: 5.5.9 Package: Session related Bug Type: Bug Bug description:session_start generates PHP Notice if session cookie contains array Description: ------------ If session cookie contains array instead of session_id string, on session_start() call PHP Notice is generated. Test script: --------------- <?php $sessionName = "PHPSESSID"; session_name($sessionName); $_COOKIE[$sessionName]['key'] = 'value'; session_start(); Expected result: ---------------- false Actual result: -------------- PHP Notice: Array to string conversion in /private/tmp/session-fail.php on line 8 PHP Stack trace: PHP 1. {main}() /private/tmp/session-fail.php:0 PHP 2. session_start() /private/tmp/session-fail.php:8 true -- Edit bug report at https://bugs.php.net/bug.php?id=66827&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66827&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66827&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66827&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66827&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66827&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66827&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66827&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66827&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66827&r=support Expected behavior: https://bugs.php.net/fix.php?id=66827&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66827&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66827&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66827&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66827&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66827&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66827&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66827&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66827&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66827&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66827&r=mysqlcfg

« previous php.bugs (#184533) next »