I'm iterating over a Config object, during the iteration I take a copy of that config object and go play with that (I unset the 'widget' property of that copy).
On second loop over the config object I try to access the 'widget' property and I get a Undefined Offset error.
The following code snippet basically shows my quandry
foreach ($block as $options) {
var_dump($options);
$newOptions = $options;
$widget = $newOptions->widget;
}
Output
object(Phalcon\Config)#143 (4) {
["widget"]=>
string(11) "ContentList"
["type"]=>
string(4) "test"
["apply_filter"]=>
bool(true)
["filter"]=>
object(Phalcon\Config)#2946 (1) {
["title"]=>
object(Phalcon\Config)#854 (1) {
["$regex"]=>
string(8) "^Title O"
}
}
}
Followed by the error. Before I write a bug report, is there something I'm missing about the way this should work?