From 52d09886558361bd818182da9ddc204e83f618ba Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 11 Dec 2017 21:11:34 +0100 Subject: Use __DIR__ for relative include and require For uniformity, and to avoid having PHP searching in include_path. http://php.net/manual/function.include.php https://github.com/FreshRSS/FreshRSS/pull/1715 https://github.com/FreshRSS/FreshRSS/pull/1711#issuecomment-350581350 --- lib/lib_rss.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/lib_rss.php') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index c06157164..e9c4da049 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -4,7 +4,7 @@ if (version_compare(PHP_VERSION, '5.3.8', '<')) { } if (!function_exists('json_decode')) { - require_once('JSON.php'); + require_once(__DIR__ . '/JSON.php'); function json_decode($var, $assoc = false) { $JSON = new Services_JSON($assoc ? SERVICES_JSON_LOOSE_TYPE : 0); return $JSON->decode($var); @@ -12,7 +12,7 @@ if (!function_exists('json_decode')) { } if (!function_exists('json_encode')) { - require_once('JSON.php'); + require_once(__DIR__ . '/JSON.php'); function json_encode($var) { $JSON = new Services_JSON(); return $JSON->encodeUnsafe($var); -- cgit v1.2.3