projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
9d22fdd
)
Check normal property before trying to de-mangle it.
author
Derick Rethans
<github@derickrethans.nl>
Thu, 7 Jul 2011 12:05:12 +0000 (13:05 +0100)
committer
Derick Rethans
<github@derickrethans.nl>
Thu, 7 Jul 2011 12:05:12 +0000 (13:05 +0100)
twig.c
patch
|
blob
|
history
diff --git
a/twig.c
b/twig.c
index
224cd94
..
7cf7ad7
100644
(file)
--- a/
twig.c
+++ b/
twig.c
@@
-314,6
+314,12
@@
zval *TWIG_PROPERTY(zval *object, char *propname)
{
char *prot_name;
int prot_name_length;
+ zval *tmp;
+
+ tmp = TWIG_GET_ARRAY_ELEMENT(object, propname, strlen(propname));
+ if (tmp) {
+ return tmp;
+ }
zend_mangle_property_name(&prot_name, &prot_name_length, "*", 1, propname, strlen(propname), 0);
return TWIG_GET_ARRAY_ELEMENT(object, prot_name, prot_name_length);