Commit a5cc8616 authored by Jason Lewis's avatar Jason Lewis

Fix bug where error is shown when named view isn't set.

Signed-off-by: 's avatarJason Lewis <jason.lewis1991@gmail.com>
parent 5d6258a7
...@@ -118,9 +118,9 @@ class View implements ArrayAccess { ...@@ -118,9 +118,9 @@ class View implements ArrayAccess {
*/ */
public static function exists($view, $return_path = false) public static function exists($view, $return_path = false)
{ {
if(starts_with($view, 'name: ')) if (starts_with($view, 'name: ') and array_key_exists($name = substr($view, 6), static::$names))
{ {
$view = static::$names[substr($view, 6)]; $view = static::$names[$name];
} }
list($bundle, $view) = Bundle::parse($view); list($bundle, $view) = Bundle::parse($view);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment