Reviewed: https://reviews.mahara.org/4928 Committed: https://git.nzoss.org.nz/mahara/mahara/commit/31c224836c7471a06e97b5471caa1c7583618a4b Submitter: Aaron Wells (aar...@catalyst.net.nz) Branch: master
commit 31c224836c7471a06e97b5471caa1c7583618a4b Author: Robert Lyon <robe...@catalyst.net.nz> Date: Wed Jul 8 12:29:48 2015 +1200 Fixing issue with forgotpass and older php versions (Bug #1472443) Change-Id: Ifc06de12c5714b26b4705ec5d495601c4ccce437 Signed-off-by: Robert Lyon <robe...@catalyst.net.nz> -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1472443 Title: Can't use method return value in write context error in forgotpass.php Status in Mahara ePortfolio: Fix Committed Status in Mahara 15.04 series: In Progress Bug description: Reported on the mahara.org forum, as a follow-up to Bug 1460911: https://mahara.org/interaction/forum/topic.php?id=7288&offset=0&limit=10#post29295 "When we tried it on our server running php version 5.4.16 on Redhat 7.1, we get a blank page and the the error PHP Fatal error: Can't use method return value in write context in /var/www/html/mahara/forgotpass.php on line 21, referer: http://cepd.aut.ac.nz/mahara/ Line 21 is: if (!empty($SESSION->get('pwchangerequested'))) { Looking into the issue I found http://stackoverflow.com/questions/1075534/cant-use-method-return- value-in-write-context/4328049#4328049 which basically says on empty() needs to access value by reference (in order to check whether that reference points to something that exists), and PHP before 5.5 didn't support references to temporary values returned from functions. Following what they suggested I changed line 21 to: if ($SESSION->get('pwchangerequested')) { Which if the answer in stackoverflow is correct should be the same as it was previously. After doing that no error is given and the page renders. Would this be the correct change for people that get that error?" Summary: Need to remove the empty() check as the options for the variable 'pwchangerequested' is true/false To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1472443/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp