Marin Orlic
|
Wednesday 28 September 2005 4:18:29 am
Hi all, I'm having some troubles when specifying attribute_filter in content/list fetch. It seems that the parser is sensitive to whitespaces - I get 'Empty variable name' errors for no apparent reason. The error can usually be fixed by replacing TABs with spaces or deleting whitespaces completely. Did anybody have the same troubles? Should I report it as a bug? eZ 3.7.0rc2, php4.4
Thx, Marin.
|
Marin Orlic
|
Thursday 29 September 2005 2:24:43 pm
Ok for instance this doesn't work..
{let users=fetch( content, list, hash( parent_node_id, 230,
class_filter_type, include,
class_filter_array, array ( 38 ),
attribute_filter, array ( and, array ( 294, '=', '1' ) ) ) ) )}
Gives
Empty variable name at [( content, list, hash( parent_node_id, 230,
class_filter_type, include,
class_filter_array, array ( 38 ),
attribute_filter, array ( and, array ( 294, '=', '1' ) ) ) ) )]
|
Marko Žmak
|
Thursday 29 September 2005 2:51:23 pm
I think you have one right bracket too much. Try removing it and see what happens. P.S. A tip: aligning your right brackets with their left bracket pair can be really useful. Like this for example:
{let users=fetch( content, list, hash( parent_node_id, 230,
class_filter_type, include,
class_filter_array, array ( 38 ),
attribute_filter, array ( and, array ( 294, '=', '1' ) )
)
)
}
--
Nothing is impossible. Not if you can imagine it!
Hubert Farnsworth
|
Leif Arne Storset
|
Sunday 11 May 2008 3:46:37 pm
I don't know if helped Orlic, but I found Zmak's advice to apply to my situation. Two missing right parens gave caused an "Empty variable name" error for me. I don't quite understand why, even after staring at the relevant PHP code for a while.
Leif Arne Storset
|