// Fix dispatcher links

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12946 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-02-02 18:43:17 +00:00
parent 206950d894
commit 132bb576c8
3 changed files with 11 additions and 5 deletions
+6 -1
View File
@@ -197,7 +197,7 @@ class ValidateCore
*/
public static function isModuleName($module_name)
{
return preg_match('/^[a-zA-Z0-9_-]+$/', $module_name);
return (is_string($module_name) && preg_match('/^[a-zA-Z0-9_-]+$/', $module_name));
}
/**
@@ -987,6 +987,11 @@ class ValidateCore
{
return (bool)preg_match('/^[0-9]{3,4}[a-zA-Z]{1}$/s', $ape);
}
public static function isControllerName($name)
{
return (bool)(is_string($name) && preg_match('/^[0-9a-zA-Z-_]*$/u', $name));
}
}