Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
A client of mine just upgraded to the latest snapshot of PHP 5.0.5-dev and started getting errors when file_check_directory() is called:
Fatal error: Only variables can be passed by reference in c:\drupal\modules\system.module on line 653
This patch fixes the problem by assigning the values to variables before passing them to file_check_directory().
Thanks.
(BTW: I'm no longer on on drupal-devel due to time constraints.)
Comment | File | Size | Author |
---|---|---|---|
#8 | references46.diff | 4.57 KB | danielc |
#7 | references45.diff | 3.76 KB | danielc |
#4 | modules_2.patch | 4.6 KB | m3avrck |
#3 | modules_1.patch | 2.13 KB | m3avrck |
#2 | user.module_5.patch | 911 bytes | m3avrck |
Comments
Comment #1
drummPatch still applies and does not cause any problems with PHP 4. I am unable to test on PHP 5.
Comment #2
m3avrck CreditAttribution: m3avrck commentedConfirmed, 5.0.5 final causes this fatal error:
Fatal error: Only variables can be passed by reference in \drupal\modules\user.module on line 1366
Rerolled patch against latest HEAD. system.module no longer needs to be updated, only user.module does.
Comment #3
m3avrck CreditAttribution: m3avrck commentedCorrection, still applies in system.module, new patch attached.
Comment #4
m3avrck CreditAttribution: m3avrck commentedSecond and final correction, turns out there were *multiple* call by reference errors in system.module (some fixed in HEAD) others not. This patch corrects them all and correctly works with PHP 5.0.5 on second round of testing.
Comment #5
Souvent22 CreditAttribution: Souvent22 commentedPHP Version 5.1.0b3
+1. Fixed all my errors for PHP5 regarding the "pass by refereance" error. I found 3 specific cases which generated the error, and now I have 0. Seems ready to go. For all who try this patch, please, as I did, place what version of PHP you're running, so we know it works for all 5.x.
Comment #6
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #7
danielc CreditAttribution: danielc commentedAttached is a patch for DRUPAL-4-5. I will attach a patch for DRUPAL-4-6 in a moment.
These patches, along with the one submitted by m3avrck, are a combination of three bug reports into one patch per branch. I will mark the following two items duplicates of this:
http://drupal.org/node/26235
http://drupal.org/node/26034
Comment #8
danielc CreditAttribution: danielc commentedPatch for 4.6.
Comment #9
Dries CreditAttribution: Dries commentedCommitted to HEAD.
Comment #10
(not verified) CreditAttribution: commentedComment #11
(not verified) CreditAttribution: commented