LogEventsList: Stop showing deprecation warning when $input is empty
authorPrateek Saxena <prtksxna@gmail.com>
Tue, 7 Aug 2018 05:14:55 +0000 (10:44 +0530)
committerPrateek Saxena <prtksxna@gmail.com>
Tue, 7 Aug 2018 08:00:13 +0000 (13:30 +0530)
Follows-up on I697e158887fcca1da88763a4c929a981d9211490

Bug: T201006
Change-Id: I140cde3f71e2bd8106f0c0ce7da1ec822a8da072

includes/logging/LogEventsList.php

index f032efc..a5aa687 100644 (file)
@@ -130,10 +130,13 @@ class LogEventsList extends ContextSource {
                        !empty( $extraInputsDescriptor )
                ) {
                        $formDescriptor[ 'extra' ] = $extraInputsDescriptor;
-               } elseif ( is_string( $extraInputsDescriptor ) ) {
+               } elseif (
+                       is_string( $extraInputsDescriptor ) &&
+                       $extraInputsDescriptor !== ''
+               ) {
                        // We'll add this to the footer of the form later
                        $extraInputsString = $extraInputsDescriptor;
-                       wfDeprecated( 'Using $input in LogEventsListGetExtraInputs hook', '1.32' );
+                       wfDeprecated( '$input in LogEventsListGetExtraInputs hook', '1.32' );
                }
 
                // Title pattern, if allowed