From 16b9cb9e68a6a3b53405b3ee0f5427c5c6899b73 Mon Sep 17 00:00:00 2001 From: Ruben Date: Sun, 4 Sep 2016 17:37:02 +0100 Subject: [PATCH] Fix bug, enable errors --- src/Models/Game.php | 2 +- www/index.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Models/Game.php b/src/Models/Game.php index 646f2ef..7d5f747 100644 --- a/src/Models/Game.php +++ b/src/Models/Game.php @@ -225,7 +225,7 @@ class Game $diffs = $betterHit->getExpressions()->getDifferences($hit->getExpressions()); $max = max($diffs); $min = min($diffs); - $diff = abs($max) > $abs($min) ? $max : $min; + $diff = abs($max) > abs($min) ? $max : $min; $diffExpression = array_search($diff, $diffs); if($diff < 1) { $diff = $diff * -1; diff --git a/www/index.php b/www/index.php index 3d0df38..64dc9d4 100644 --- a/www/index.php +++ b/www/index.php @@ -12,6 +12,10 @@ $app = new Silex\Application([ 'debug' => $eh->getConfig()['debug'] ]); +// disable when going in production. +error_reporting(E_ALL); +ini_set('display_errors', 1); + /* * JWT setup */