Author: ibrash
Description:
Generating the recent changes page on PHP 5.0.3RC1 (problem also occurred on
5.0.1 before upgrading) generates errors of the form:
Fatal error: Only variables can be passed by reference in
/path/to/wiki/includes/ChangesList.php on line 494
It appears that makeKnownLinkObj accepts a reference as its first argument
(&$nt) but lines 494, 495 and 503 of ChangesList.php pass in $rc->getTitle()
which is not a variable.
Possible ways to fix:
- Change makeKnownLinkObj to not use an explicit reference. PHP 5 will pass by
reference automatically but this would cause PHP4 to make a copy of the object.
This inconsistency may preclude this as a solution.
- Assign $rc->getTitle() to a local variable and pass this instead.
PHP5 Workaround: Setting the zend.ze1_compatibility_mode flag emulates much of
PHP4's object behavior and thus no error is emitted.
Version: 1.4.x
Severity: normal
OS: Linux
Platform: PC