Hi Guys,
I'm using phalcon 2.1.0 RC1. Latest windows binary available on the blog.
Throw this in any volt file:
<?php $test = (object) array((object) array('test')); ?>
<?php var_dump(count($test)); ?>
<?php var_dump($this->length($test)); ?>
<?php var_dump(gettype($test)); ?>
<?php var_dump($test); ?>
The output is as follows:
int 1
int 0
string 'object' (length=6)
object(stdClass)[178]
public 0 =>
object(stdClass)[176]
public 0 => string 'test' (length=4)
Does anyone know why the volt filter is returning 0?
I don't see anything wrong with the function in zephir: https://github.com/phalcon/cphalcon/blob/96422c673ff544b9468643b31ea42897d343e092/phalcon/mvc/view/engine/volt.zep#L130