Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: [Kint] Bool value exception while file validation #7337

Closed
wants to merge 1 commit into from

Conversation

DhPandya
Copy link
Contributor

@DhPandya DhPandya commented Mar 6, 2023

Description
When a file validation run fails, $this->mtime is a bool and not null. So the condition got true and the date() function throws the exception. This is the case when you use the validation like below.

 'userfile' => [
    'label' => 'Image File',
    'rules' => [
          'uploaded[userfile]',
          'is_image[userfile]',
          'mime_in[userfile,image/jpg,image/jpeg,image/gif,image/png,image/webp]',
          'max_size[userfile,100]',
          'max_dims[userfile,1024,768]',
    ],
]

Screenshot (52)

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

When a file validation run fails, $this->mtime is a bool and not null. So the condition got true and the date() function throws the exception.
@kenjis
Copy link
Member

kenjis commented Mar 6, 2023

Thank you for sending PR!

But unfortunately the code is not ours.
We do not accept this PR.

@kenjis kenjis changed the title Fixed: Bool value exception while file validation Fixed: [Kint] Bool value exception while file validation Mar 6, 2023
@samsonasik samsonasik closed this Mar 7, 2023
@kenjis
Copy link
Member

kenjis commented Mar 7, 2023

I reported to Kint. kint-php/kint#407

@kenjis
Copy link
Member

kenjis commented Mar 18, 2023

Fixed by #7358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants