Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.1

Bug #5830 Fatal error: Only variables can be passed by reference in /usr/local/share/php/
Submitted: 2005-10-31 10:05 UTC
From: jeroen at terena dot nl Assigned: mike
Status: Closed Package: HTTP_Header
PHP Version: 5.0.5 OS: debian
Roadmaps: (Not assigned)    
Subscription  


 [2005-10-31 10:05 UTC] jeroen at terena dot nl
Description: ------------ Calling send->headers() triggers a fatal error in PHP 505 Fatal error: Only variables can be passed by reference in /usr/local/share/php/ Similar errors occur in other packages.scripts as well due to a change in behaviour between php 5.0.4 and 5.0.4+ IIRC Test script: --------------- $httpCache = new HTTP_Header_Cache(); $httpCache->setLastModified($this->modified); $httpCache->sendHeaders(); Expected result: ---------------- no error. Patch: function getCacheStart() { if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && !$this->isPost()) { $bits = explode(';', $_SERVER['HTTP_IF_MODIFIED_SINCE']); $time = array_shift($bits); $timestamp = strtotime($time); return $timestamp; } return time(); } Actual result: -------------- Fatal error: Only variables can be passed by reference in /usr/local/share/php/

Comments

 [2005-11-08 19:08 UTC] mike
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.