Actions

Difference between revisions of "Empty-$path-issue-in-2.5.10"

From Joomla! Documentation

(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...")
 
 
Line 27: Line 27:
  
 
</code>
 
</code>
 +
 +
<noinclude>[[Category:Version 2.5 FAQ]]
 +
[[Category:Version 2.5.10 FAQ]]
 +
</noinclude>

Latest revision as of 03:56, 27 April 2013

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