Follow-up I47412b67 (dde8471): convert string query to array
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 14 Aug 2012 09:51:26 +0000 (11:51 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 14 Aug 2012 09:51:26 +0000 (11:51 +0200)
If we detect and warn that the $query parameter is in an incorrect
format, we may as well convert it to the correct one.

Change-Id: Ief137ab758c65ec562c2a523f76b1a4f8c2617b5

includes/Linker.php

index 9949aa8..5b1f0ff 100644 (file)
@@ -202,6 +202,7 @@ class Linker {
                if( is_string( $query ) ) {
                        // some functions withing core using this still hand over query strings
                        wfDeprecated( __METHOD__ . ' with parameter $query as string (should be array)', '1.20' );
+                       $query = wfCgiToArray( $query );
                }
                $options = (array)$options;