Actions

Empty-$path-issue-in-2.5.10

From Joomla! Documentation

Revision as of 03:56, 27 April 2013 by Elin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In version 2.5.10 some extensions show an empty $path error. The best solution for this is to update to 2.5.11.

If for some reason you cannot update to 2.5.11 you can apply the following hot fix.

Navigate to libraries/joomla/filesystem/path.php.

At about line 202 change

if (!is_string($path)) 
to
if (!is_string($path) && !empty($path))


diff --git a/libraries/joomla/filesystem/path.php b/libraries/joomla/filesystem/path.php
index d4c8bb9..d5116c8 100644
--- a/libraries/joomla/filesystem/path.php
+++ b/libraries/joomla/filesystem/path.php
@@ -199,7 +199,7 @@ class JPath
         */
        public static function clean($path, $ds = DIRECTORY_SEPARATOR)
        {
-               if (!is_string($path))
+               if (!is_string($path) && !empty($path))
                {
                        throw new UnexpectedValueException('JPath::clean: $path is not a string.');
                }