Skip to content

Phalcon ORM writeAttribute when value is an associative array #14021

Closed
@wajdijurry

Description

@wajdijurry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement to the framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions