When uploading a file it is expected the file is saved and the database entity is saved. However due to a strict check on Line 90 https://github.com/FriendsOfCake/cakephp-upload/blob/master/src/Model/Behavior/UploadBehavior.php#L90 this code block always trigger because Hash::get((array)$entity->get($field), 'error') returns string '0' (length=1) when the strict check is for int 0 ex define ('UPLOAD_ERR_OK', 0);
CakePHP 3.7.4 FOC/cakephp-upload 4.0 Apache 2.4.38 PHP 7.2.15 macOS 10.14.3 Apache, PHP, mariaDB installed via HomeBrew
When uploading a file it is expected the file is saved and the database entity is saved. However due to a strict check on Line 90 https://github.com/FriendsOfCake/cakephp-upload/blob/master/src/Model/Behavior/UploadBehavior.php#L90 this code block always trigger because
Hash::get((array)$entity->get($field), 'error')
returnsstring '0' (length=1)
when the strict check is forint 0
exdefine ('UPLOAD_ERR_OK', 0);