Revision: 45956
Author:   catrope
Date:     2009-01-21 09:26:48 +0000 (Wed, 21 Jan 2009)

Log Message:
-----------
Fix up r45749: do is_string() check in the caller instead

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiResult.php
    trunk/phase3/includes/normal/UtfNormal.php

Modified: trunk/phase3/includes/api/ApiResult.php
===================================================================
--- trunk/phase3/includes/api/ApiResult.php     2009-01-21 09:22:48 UTC (rev 
45955)
+++ trunk/phase3/includes/api/ApiResult.php     2009-01-21 09:26:48 UTC (rev 
45956)
@@ -192,8 +192,15 @@
        public function cleanUpUTF8()
        {
                $data = & $this->getData();
-               array_walk_recursive($data, array('UtfNormal', 'cleanUp'));
+               array_walk_recursive($data, array('ApiResult', 
'cleanUp_helper'));
        }
+       
+       private static function cleanUp_helper($s)
+       {
+               if(!is_string($s))
+                       return $s;
+               return UtfNormal::cleanUp($s);
+       }
 
        public function execute() {
                ApiBase :: dieDebug(__METHOD__, 'execute() is not supported on 
Result object');

Modified: trunk/phase3/includes/normal/UtfNormal.php
===================================================================
--- trunk/phase3/includes/normal/UtfNormal.php  2009-01-21 09:22:48 UTC (rev 
45955)
+++ trunk/phase3/includes/normal/UtfNormal.php  2009-01-21 09:26:48 UTC (rev 
45956)
@@ -72,9 +72,6 @@
         * @return string a clean, shiny, normalized UTF-8 string
         */
        static function cleanUp( $string ) {
-               if( !is_string( $string ) ) {
-                       return $string;
-               }
                if( NORMALIZE_ICU ) {
                        # We exclude a few chars that ICU would not.
                        $string = preg_replace(



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to