Linker::link() prints deprecated warning if $query is a string
[lhc/web/wiklou.git] / 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