From 156bc6f2344f5ba27d5c4f403d535c713df6bcbe Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Wed, 27 Jan 2016 09:50:32 +0000 Subject: Add missing newline to Response.class.php Right before text_error(), there was a missing newline. This bug was introduced in commit a92961f24072bc4c3881bf0e2f609562f3703471. --- static/classes/Response.class.php | 1 + 1 file changed, 1 insertion(+) (limited to 'static') diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 24b4fcb..505ae90 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -153,6 +153,7 @@ class Response 'files' => $files, ), JSON_PRETTY_PRINT); } + private static function text_error($code, $description) { return 'ERROR: ('.$code.') '.$description; -- cgit v1.2.3 From 5ac30eb86d2c5ac5b4e72651575600f46c2c8a01 Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Wed, 27 Jan 2016 09:55:14 +0000 Subject: Fix undeclared vars in html_success() and text_success() As explained by clsr: > With default PHP settings, that'd print a warning, then treat > $result as if it was an empty string before appending. This bug was introduced in commit a92961f24072bc4c3881bf0e2f609562f3703471 and 1411bce1dc13bf6fea66b5899ba29d50d5c53bb0. Reported-by: clsr Suggested-by: clsr --- static/classes/Response.class.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'static') diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 505ae90..27dbd74 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -130,6 +130,8 @@ class Response private static function html_success($files) { + $result = ''; + foreach ($files as $file) { $result .= ''.$file['url'].'
'; } @@ -161,6 +163,8 @@ class Response private static function text_success($files) { + $result = ''; + foreach ($files as $file) { $result .= $file['url']."\n"; } -- cgit v1.2.3