[BUG]: Property source is overwritten in models #16514
Description
Questions? Forum: https://phalcon.io/forum or Discord: https://phalcon.io/discord
Describe the bug
If filed in database called source
, content of it is overwritten with table name.
May be related to #11253
Could have something with method setSource() in a Model?.
To Reproduce
Get data from any table with field called source
- content will be replaced with table name.
It doesn't matter, if $this->setSource('tablename')
is called in initialize or table name is detected automatically from model name.
Expected behavior
source
should contain data from database.
Screenshots
If applicable, add screenshots to help explain your problem.
Details
- Phalcon version: tested with 5.5 and 5.6. On 5.4 bug doesn't exist
- PHP Version: 8.2.13
- Operating System: Rocky 9
- Installation type: installing via package manager
- Zephir version (if any): -
- Server: Apache/2.4.57 (Rocky Linux)
- Other related info (Database, table schema): mariadb 11.2, tested with 10.11 too.
Additional information
Checked other keywords, they are not affected (transaction
, group
).
Workaround for those who facing the bug - use version 5.4 or replace source
with another field name.
Metadata
Assignees
Type
Projects
Status
Released