mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
eeaaf131ac
This changes a couple of cases, in postgres and oracle where we were trying to calculate strlen() on null values (that causes a PHP 8.1 warning). Also, at the same time, fixing another case in xmldb_field, it was detected that it had a bug around precision (being set to the value of type), being used as object property, when it's not, so it was also fixed by moving the code logic a little bit. Note that the bug has been there since inception because there isn't any code in Moodle using that ->precision property. It was just detected thanks to PHP 8.2, but that's another story. :-) Verified that with the patch: - All DBs can be installed (phpunit install) - Both DDL and DML pass without any ddl/dml warning (in all DBs).