From: Roland Häder Date: Fri, 9 Jan 2015 08:01:54 +0000 (+0100) Subject: In multiple catch blocks you can always specify the same variable in each block X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e7a71e36b77d9979f3797bc299fa4f1c378d62f6;p=quix0rs-gnu-social.git In multiple catch blocks you can always specify the same variable in each block as it will be reinitialized in the next block. Signed-off-by: Roland Häder --- diff --git a/index.php b/index.php index 76e4cfe716..3289d29b34 100644 --- a/index.php +++ b/index.php @@ -317,14 +317,14 @@ function main() } else { try { call_user_func("$action_class::run", $args); - } catch (ClientException $cex) { - $cac = new ClientErrorAction($cex->getMessage(), $cex->getCode()); + } catch (ClientException $e) { + $cac = new ClientErrorAction($e->getMessage(), $e->getCode()); $cac->showPage(); - } catch (ServerException $sex) { // snort snort guffaw - $sac = new ServerErrorAction($sex->getMessage(), $sex->getCode(), $sex); + } catch (ServerException $e) { // snort snort guffaw + $sac = new ServerErrorAction($e->getMessage(), $e->getCode(), $e); $sac->showPage(); - } catch (Exception $ex) { - $sac = new ServerErrorAction($ex->getMessage(), 500, $ex); + } catch (Exception $e) { + $sac = new ServerErrorAction($e->getMessage(), 500, $e); $sac->showPage(); } }