You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
everything works perfectly for insert and update. But when I try to delete an entity that has an enum, validation occurs and fails with the following message
array_key_exists(): Argument #1 ($key) must be a valid array offset type
then everything works. Is this the intended behavior or am I missing something? I've tried this on the latest 5.1.1 of cake as well as the latest version of this plugin.
The text was updated successfully, but these errors were encountered:
johneady
changed the title
Delete fails unless I remove checkRules on delete for const strategy
Delete fails unless I remove checkRules on delete
Dec 14, 2024
Hi folks, when I use the plugin using the const strategy.
const STATUS_PUBLIC = 'Published'; const STATUS_DRAFT = 'Drafted'; const STATUS_ARCHIVE = 'Archived';
$this->addBehavior('CakeDC/Enum.Enum', ['lists' => [ 'status_ind' => [ 'strategy' => 'const', 'prefix' => 'STATUS' ] ]]);
everything works perfectly for insert and update. But when I try to delete an entity that has an enum, validation occurs and fails with the following message
array_key_exists(): Argument #1 ($key) must be a valid array offset type
when I bypass validation.
$this->Users->delete($user, ['checkRules' => false])
then everything works. Is this the intended behavior or am I missing something? I've tried this on the latest 5.1.1 of cake as well as the latest version of this plugin.
The text was updated successfully, but these errors were encountered: