From: Timo Tijhof Date: Wed, 2 Mar 2016 21:52:21 +0000 (+0000) Subject: api: Fix "PHP Notice: Undefined variable: config" X-Git-Tag: 1.31.0-rc.0~7755 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=ee1d97b3cc731618d184facba9dec0f1afda0833;p=lhc%2Fweb%2Fwiklou.git 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 --- 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';