Commit 43cee22e by Jordi Boggiano

Fixed extends bug when calling {extends} with parenthesis

parent 9fb7da89
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
it with caution it with caution
* Fixed PHP parse errors being generated in compiled templates when * Fixed PHP parse errors being generated in compiled templates when
{dynamic} was nested {dynamic} was nested
* Fixed extends bug when calling {extends} with parenthesis
* Fixed a double escaping bug when a variable was assigned to another one * Fixed a double escaping bug when a variable was assigned to another one
* Added $this->viewParam support to ZendFramework adapter through a * Added $this->viewParam support to ZendFramework adapter through a
Dwoo_Adapters_ZendFramework_Dwoo class that extends Dwoo, you should use Dwoo_Adapters_ZendFramework_Dwoo class that extends Dwoo, you should use
......
...@@ -74,7 +74,7 @@ class Dwoo_Plugin_extends extends Dwoo_Plugin implements Dwoo_ICompilable ...@@ -74,7 +74,7 @@ class Dwoo_Plugin_extends extends Dwoo_Plugin implements Dwoo_ICompilable
} }
$inheritanceTree[] = $newParent; $inheritanceTree[] = $newParent;
if (preg_match('/^'.self::$l.'extends\s+(?:file=)?\s*((["\']).+?\2|\S+?)'.self::$r.'/i', $parent->getSource(), $match)) { if (preg_match('/^'.self::$l.'extends(?:\(?\s*|\s+)(?:file=)?\s*((["\']).+?\2|\S+?)\s*\)\s*?'.self::$r.'/i', $parent->getSource(), $match)) {
$curPath = dirname($identifier) . DIRECTORY_SEPARATOR; $curPath = dirname($identifier) . DIRECTORY_SEPARATOR;
if (isset($match[2]) && $match[2] == '"') { if (isset($match[2]) && $match[2] == '"') {
$file = '"'.str_replace('"', '\\"', substr($match[1], 1, -1)).'"'; $file = '"'.str_replace('"', '\\"', substr($match[1], 1, -1)).'"';
......
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