ApiHelp: Fix undefined array index reference
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 7 May 2015 16:21:27 +0000 (12:21 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 7 May 2015 16:21:27 +0000 (12:21 -0400)
Follows up I0219689.

Change-Id: I833d8eab49a7093872a66c3bb0d314f6c7adb98c

includes/api/ApiHelp.php

index c302ad1..27fc378 100644 (file)
@@ -111,7 +111,7 @@ class ApiHelp extends ApiBase {
                        if ( $cacheHelpTimeout > 0 ) {
                                // Get help text from cache if present
                                $cacheKey = wfMemcKey( 'apihelp', $modules[0]->getModulePath(),
-                                       $options['toc'] ? 1 : 0,
+                                       (int)!empty( $options['toc'] ),
                                        str_replace( ' ', '_', SpecialVersion::getVersion( 'nodb' ) ) );
                                $cached = $wgMemc->get( $cacheKey );
                                if ( $cached ) {