Hello everyone!
I have an array that is being generated via ::find() but when I try to loop through it to change information in one of it's variables, it fails unless I use a static number. Code example:
$escalation = Escalations::find();
for($i = 0; $i < sizeof($escalation); $i++) { $escalation[$i]->TIME_OPENED = 'test'; } $this->view->setVar('escalation', $escalation);
This fails on the Volt side of things and has no information in TIME_OPENED.
However, if I use static numbers to assign TIME_OPENED, it works just fine. Example:
$escalation = Escalations::find();
$escalation[0]->TIME_OPENED = 'test0'; $escalation[1]->TIME_OPENED = 'test1'; $escalation[2]->TIME_OPENED = 'test2'; $this->view->setVar('escalation', $escalation);
Obviously this is an issue since there may be 1 object or 10 objects. Any ideas?