Skip to content

Commit

Permalink
Update UploadBehavior.php
Browse files Browse the repository at this point in the history
  • Loading branch information
allanmcarvalho authored Nov 14, 2017
1 parent 4f41d03 commit 68a4899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Behavior/UploadBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function beforeSave(Event $event, EntityInterface $entity, \ArrayObject $
{
if ($entity->has($field) and $entity->dirty($field))
{
if (Hash::get((array) $entity->get($field), 'error') !== UPLOAD_ERR_OK)
if (Hash::get((array) $entity->get($field), 'error') != UPLOAD_ERR_OK)
{
\Cake\Log\Log::write(\Psr\Log\LogLevel::ERROR, __d('upload', 'File upload had the following error: {0}', $this->getUploadError($entity->get($field)['error'])));
return false;
Expand Down

0 comments on commit 68a4899

Please sign in to comment.