demianturner / sgl-docs-tickets-migration-test

0 stars 0 forks source link

SectionMgr problem in PHP5.3 #1758

Closed demianturner closed 11 years ago

demianturner commented 11 years ago

After upgrading to PHP5.3, I noticed that the Navigation module isn't working properly anymore. It turned out that the SectionMgr passes the parameter by value i.o by reference to the functions NavigationDAO::addSection and NavigationDAO::updateSection. Although incorrect, PHP5.2 and earlier accepted this and silently continue to work. However, a change in PHP5.3 in call_user_func_array(), now fires a warning and returns FALSE when parameters are used incorrectly.

call_user_func_array() is used in SGL_Delegator like this:

return call_user_func_array(array($delegate, $methodName), $parameters);

SectionMgr uses SGL_Delegator and passes values i.o. references.

Both have been fixed in the enclosed patch

demianturner commented 11 years ago

[petert] Pls.ignore Navigation.patch and use Navigation1758.patch

demianturner commented 11 years ago

[demian] thanks for this Peter, patch applied in bugfix and a more reductive fix applied in trunk.