From ee1d97b3cc731618d184facba9dec0f1afda0833 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 2 Mar 2016 21:52:21 +0000 Subject: [PATCH] api: Fix "PHP Notice: Undefined variable: config" Follows-up 362c220aa1, which split the method up but didn't re-create a local $config variable. Change-Id: Ic32ac3c600d0b4d69e8129fa50ea47d9a6a54b20 --- includes/api/ApiMain.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 4783fb42c3..9e5681984c 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -861,6 +861,7 @@ class ApiMain extends ApiBase { // User entered incorrect parameters - generate error response $errMessage = $e->getMessageArray(); } else { + $config = $this->getConfig(); // Something is seriously wrong if ( ( $e instanceof DBQueryError ) && !$config->get( 'ShowSQLErrors' ) ) { $info = 'Database query error'; -- 2.20.1