Reviewed: https://reviews.mahara.org/7824 Committed: https://git.mahara.org/mahara/mahara/commit/0488ae4d700cd7580828979632667832afa921e6 Submitter: Robert Lyon ([email protected]) Branch: master
commit 0488ae4d700cd7580828979632667832afa921e6 Author: Mark Nielsen <[email protected]> Date: Wed Jun 14 12:07:34 2017 +1200 Bug 1693559: php7 compatibility issue in search/internal/lib.php file behatnotneeded Change-Id: I336bdb523c0ff138351d77f747a233cc390b44af -- 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: In Progress 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

