Reviewed: https://reviews.mahara.org/7838 Committed: https://git.mahara.org/mahara/mahara/commit/4a292254ab98c2dfd23c4b86bdd0aa534e6da5d0 Submitter: Robert Lyon ([email protected]) Branch: master
commit 4a292254ab98c2dfd23c4b86bdd0aa534e6da5d0 Author: Cecilia Vela Gurovic <[email protected]> Date: Wed Jun 28 12:59:56 2017 +1200 Bug 1693559: Fixing php7 compatibility errors Error message: Removed "HTTP_RAW_POST_DATA" variable used Issue: http://php.net/manual/en/reserved.variables.httprawpostdata.php variable deprecated in php7. We need to use the content of php://input instead. behatnotneeded Change-Id: Ia2e16fa08dc2dc7cefa980570c7095cb80dbd0c4 -- 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/1693559 Title: Fix remaining PHP7 compatibility problems Status in Mahara: Fix Committed Bug description: Mahara 16.10.4. Used https://github.com/JakubOnderka/PHP-Parallel-Lint to lint the Mahara codebase, found these issues: ------------------------------------------------------------ Parse error: mahara/auth/saml/extlib/simplesamlphp/vendor/openid/php-openid/Tests/Auth/OpenID/StoreTest.php:699 697| $db->query("USE $temp_db_name"); 698| > 699| $store =& new Auth_OpenID_MDB2Store($db); 700| if (!$store->createTables()) { 701| $this->fail("Failed to create tables"); Unexpected 'new' (T_NEW) ------------------------------------------------------------ Parse error: mahara/lib/elastica/lib/Elastica/Filter/Bool.php:13 11| * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-filter.html 12| */ > 13| class Bool extends BoolFilter 14| { 15| } Fatal error: Cannot use 'Bool' as class name as it is reserved ------------------------------------------------------------ Parse error: mahara/lib/elastica/lib/Elastica/Query/Bool.php:13 11| * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html 12| */ > 13| class Bool extends BoolQuery 14| { 15| } Fatal error: Cannot use 'Bool' as class name as it is reserved ------------------------------------------------------------ Parse error: mahara/lib/elastica/lib/Elastica/Transport/Null.php:11 9| * @author James Boehmer <[email protected]> 10| */ > 11| class Null extends NullTransport 12| { 13| } Fatal error: Cannot use 'Null' as class name as it is reserved ------------------------------------------------------------ There is also another tool that finds several other errors in the codebase, https://github.com/sstalle/php7cc - in particular this one will error: File: search/internal/lib.php > Line 1281: Removed regular expression modifier "e" used preg_replace('/&(#x?)?([A-Za-z0-9]+);/e', '_decode_entities("$1", "$2", "$0", $newtable, $exclude)', $text); There is another modifier "e" usage, but looks like it is only used in a 2009 upgrade step. There are MANY more warnings, deprecations and errors reported. Yet another tool to check compatibility is https://github.com/wimg/PHPCompatibility which mostly reports the same information as php7cc, but it is harder to use. It does however have support for PHP7.1. Cheers! To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1693559/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

