jenkins-bot has submitted this change and it was merged.
Change subject: fix bug of arguments order when calling object methods (v 3.2.1)
......................................................................
fix bug of arguments order when calling object methods (v 3.2.1)
* ksort( $arguments ); in Hooks::callObjectsMethod() and callStaticMethod()
* global $wgPhpTagsBytecodeExptime; in PhpTags::updateBytecodeCache()
Change-Id: If0178eee21c44799a68a6183edd21066006eb2d7
---
M PhpTags.body.php
M PhpTags.php
M includes/Hooks.php
3 files changed, 5 insertions(+), 1 deletion(-)
Approvals:
Pastakhov: Looks good to me, approved
jenkins-bot: Verified
diff --git a/PhpTags.body.php b/PhpTags.body.php
index 09e4bf9..f05dc21 100644
--- a/PhpTags.body.php
+++ b/PhpTags.body.php
@@ -185,6 +185,8 @@
}
private static function updateBytecodeCache() {
+ global $wgPhpTagsBytecodeExptime;
+
$cache = wfGetCache( CACHE_ANYTHING );
foreach ( self::$bytecodeNeedsUpdate as $frameID => $dataArray
) {
$key = wfMemcKey( 'phptags', $frameID,
PHPTAGS_RUNTIME_RELEASE );
diff --git a/PhpTags.php b/PhpTags.php
index 0d39d5f..0dd1f23 100644
--- a/PhpTags.php
+++ b/PhpTags.php
@@ -17,7 +17,7 @@
define( 'PHPTAGS_MAJOR_VERSION', 3 );
define( 'PHPTAGS_MINOR_VERSION', 2 );
-define( 'PHPTAGS_RELEASE_VERSION', 0 );
+define( 'PHPTAGS_RELEASE_VERSION', 1 );
define( 'PHPTAGS_VERSION', PHPTAGS_MAJOR_VERSION . '.' . PHPTAGS_MINOR_VERSION
. '.' . PHPTAGS_RELEASE_VERSION );
define( 'PHPTAGS_HOOK_RELEASE', 4 );
diff --git a/includes/Hooks.php b/includes/Hooks.php
index e06a4ae..bc842ba 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -226,6 +226,7 @@
*/
private static function callObjectsMethod( $arguments, $name, $object )
{
if ( $object instanceof GenericObject ) {
+ ksort( $arguments );
if ( true === $object->checkArguments( $object, $name,
$arguments ) ) {
return call_user_func_array( array($object,
"m_$name"), $arguments );
} else {
@@ -240,6 +241,7 @@
$object = $object->getName();
}
$className = self::getClassNameByObjectName( $object );
+ ksort( $arguments );
if ( true === $className::checkArguments( $object, $name,
$arguments ) ) {
$arguments[] = $object;
return call_user_func_array( array($className,
"s_$name"), $arguments );
--
To view, visit https://gerrit.wikimedia.org/r/153374
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If0178eee21c44799a68a6183edd21066006eb2d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTags
Gerrit-Branch: master
Gerrit-Owner: Pastakhov <[email protected]>
Gerrit-Reviewer: Pastakhov <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits