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

Twig_File_Filters->check_extension() method : issue when file is non existent (empty upload field in CMS) #21

Open
sentry-io bot opened this issue Jan 10, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@sentry-io
Copy link

sentry-io bot commented Jan 10, 2024

Sentry Issue: PHP-SURFE-2W

ErrorException: Warning: Trying to access array offset on value of type bool
  File "/wp-content/themes/surfe/lib/twig/file-filters.php", line 42, in Mill3\Twig\Twig_File_Filters::check_extension
    $id = gettype($file) == 'object' ? $file->ID : $file['ID'];
  File "/wp-content/themes/surfe/lib/twig/file-filters.php", line 90, in Mill3\Twig\Twig_File_Filters::is_video
    return $this->check_extension($file, array('mp4'));
  File "/wp-content/plugins/timber-library/lib/Loader.php", line 79, in Timber\Loader::render
    $output = $template->render($data);
  File "/wp-content/plugins/timber-library/lib/Timber.php", line 334, in Timber\Timber::compile
    $output = $loader->render($file, $data, $expires, $cache_mode);
  File "/wp-content/plugins/timber-library/lib/Timber.php", line 383, in Timber\Timber::fetch
    $output = self::compile($filenames, $data, $expires, $cache_mode, true);
...
(35 additional frame(s) were not displayed)
@sentry-io sentry-io bot added bug Something isn't working enhancement New feature or request labels Jan 10, 2024
@thetoine thetoine changed the title ErrorException: Warning: Trying to access array offset on value of type bool Twig_File_Filters::is_video : issue when file is non existent (empty upload field in CMS) Jan 10, 2024
@thetoine thetoine changed the title Twig_File_Filters::is_video : issue when file is non existent (empty upload field in CMS) Twig_File_Filters->check_extension() method : issue when file is non existent (empty upload field in CMS) Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

0 participants