summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaufan Aditya <toopay@taufanaditya.com>2012-03-12 15:33:55 +0100
committerTaufan Aditya <toopay@taufanaditya.com>2012-03-12 15:33:55 +0100
commit4a7dd98ffd1d21f2b14b9eefa70e6cae2f9aa92d (patch)
treeeb2f5dea3f7f9806351282d1819c789bd6433121
parent89338828264a6b50e0eb63c449a96f14f0f84076 (diff)
Left the function_exists due some security restriction in some hosting environment
-rw-r--r--system/helpers/path_helper.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php
index 1b9bdae75..9c0af44c1 100644
--- a/system/helpers/path_helper.php
+++ b/system/helpers/path_helper.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP 5.1.6 or newer
*
* NOTICE OF LICENSE
*
@@ -58,7 +58,14 @@ if ( ! function_exists('set_realpath'))
}
// Resolve the path
- $realpath = realpath($path);
+ if (function_exists('realpath'))
+ {
+ $realpath = realpath($path);
+ }
+ else
+ {
+ $realpath = (is_dir($path) or is_file($path)) ? $path : FALSE;
+ }
if ( ! $realpath)
{