Merge branch 'develop' into feature/nonce

This commit is contained in:
Flavio Copes
2015-11-11 17:47:57 +01:00
2 changed files with 4 additions and 4 deletions

View File

@@ -413,7 +413,7 @@ class Assets
}
$key = md5($asset);
if (is_string($asset) && !array_key_exists($key, $this->inline_css)) {
if ($asset && is_string($asset) && !array_key_exists($key, $this->inline_css)) {
$this->inline_css[$key] = $data;
}
@@ -460,7 +460,7 @@ class Assets
}
$key = md5($asset);
if (is_string($asset) && !array_key_exists($key, $this->inline_js)) {
if ($asset && is_string($asset) && !array_key_exists($key, $this->inline_js)) {
$this->inline_js[$key] = $data;
}

View File

@@ -284,11 +284,11 @@ class Themes extends Iterator
$class = substr($class, strlen($prefix));
// Replace namespace tokens to directory separators
$path = ltrim(preg_replace('#\\\|_(?!.+\\\)#', '/', $class), '/');
$path = strtolower(ltrim(preg_replace('#\\\|_(?!.+\\\)#', '/', $class), '/'));
$file = $locator->findResource("themes://{$path}/{$path}.php");
// Load class
if (stream_resolve_include_path($file)) {
if (file_exists($file)) {
return include_once($file);
}
}