Linker::link() prints deprecated warning if $query is a string
authorDaniel Werner <daniel.werner@wikimedia.de>
Thu, 5 Jul 2012 13:58:42 +0000 (15:58 +0200)
committerDaniel Werner <daniel.werner@wikimedia.de>
Tue, 7 Aug 2012 10:50:05 +0000 (12:50 +0200)
Change-Id: I47412b67b964ff0d868f181903628de3fd41365a

includes/Linker.php

index 9fcac65..70dac96 100644 (file)
@@ -198,6 +198,11 @@ class Linker {
                        wfProfileOut( __METHOD__ );
                        return "<!-- ERROR -->$html";
                }
+
+               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' );
+               }
                $options = (array)$options;
 
                $dummy = new DummyLinker; // dummy linker instance for bc on the hooks