Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Bugfix for MultilanguageModel #674
A bug occurs while editing a content page in the VCMS for the 8th language.
@reviewer I did a code review and
In general it is not correct to use return value of 'execute' to make assumptions about the success of the sql statement as it only returns the number of effected rows and that can be 0 if the value remains unchanged.
If there is really the need to know if there was a match in the database there is also the possibility to change that MySQL behavior to return always the amount of rows that match even if not changed by setting CLIENT_FOUND_ROWS in the connection https://dev.mysql.com/doc/refman/8.0/en/mysql-affected-rows.html.
In the BaseModel _update will always return true independent of the number of affected rows so I guess that behavior would also be correct for this class.