projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
337ed91
)
fixed error management as hhvm returns a directory in a stacktrace when the file...
author
Fabien Potencier
<fabien.potencier@gmail.com>
Thu, 19 Sep 2013 11:43:44 +0000 (13:43 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Sat, 28 Sep 2013 11:14:22 +0000 (13:14 +0200)
lib/Twig/Error.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Error.php
b/lib/Twig/Error.php
index
61a4cfa
..
914b3ed
100644
(file)
--- a/
lib/Twig/Error.php
+++ b/
lib/Twig/Error.php
@@
-217,6
+217,11
@@
class Twig_Error extends Exception
$r = new ReflectionObject($template);
$file = $r->getFileName();
+ // hhvm has a bug where eval'ed files comes out as the current directory
+ if (is_dir($file)) {
+ $file = '';
+ }
+
$exceptions = array($e = $this);
while (($e instanceof self || method_exists($e, 'getPrevious')) && $e = $e->getPrevious()) {
$exceptions[] = $e;