Closed
Description
When using $model->writeAttribute('field', ['a'=>'apply', 'b'=>'banana'])
to write an associative array to an attribute in the model, the result is strange.
Expected and Actual Behavior
Expected result:
$model->field = ['a'=>'apply', 'b'=>'banana']
Actual result:
$model->a = 'apple';
$model->b = 'banana';
This behavior happening when trying to write a new attribute to a model, and the value must be an associative array.
Details
- Phalcon version: (
3.4.2
) - PHP Version: (
7.2.15
) - Operating System: Ubuntu 18.10
- Installation type: Docker