J2.5

Empty $path issue in 2.5.10

From Joomla! Documentation

Revision as of 03:54, 27 April 2013 by Elin (talk | contribs) (Created page with "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 t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The "J2.5" namespace is a namespace scheduled to be archived. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

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.');
		}