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

Collection::offsetExists and ErrorException: iconv Fatal Errors #1690

Closed
adamsewell opened this issue Jan 31, 2022 · 2 comments
Closed

Collection::offsetExists and ErrorException: iconv Fatal Errors #1690

adamsewell opened this issue Jan 31, 2022 · 2 comments

Comments

@adamsewell
Copy link

adamsewell commented Jan 31, 2022

I've recently noticed that incoming email is not automatically creating new tickets. When I run System -> Tools -> Fetch Email it works as normal. However, when I run the cron job manually, I get the following fatal errors.

PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /path/to/freescout/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1693
Stack trace:
#0 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Support/Collection.php(19): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /path/to/freescout/vendor/composer/ClassLoader.php(478): include('...')
#2 /path/to/freescout/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile()
#3 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Support/helpers.php(423): Composer\Autoload\ClassLoader->loadClass()
#4 /path/to/freescout/overrides/Illuminate/Foundation/PackageManifest.php(80): collect()
#5 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#6 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap()
#7 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(296): Illuminate\Foundation\Application->bootstrapWith()
#8 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(119): Illuminate\Foundation\Console\Kernel->bootstrap()
#9 /path/to/freescout/artisan(43): Illuminate\Foundation\Console\Kernel->handle()
#10 {main} in /path/to/freescout/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 19

PHP Fatal error:  Uncaught ErrorException: iconv(): Passing null to parameter #3 ($string) of type string is deprecated in /path/to/freescout/vendor/symfony/polyfill-mbstring/Mbstring.php:114
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /path/to/freescout/vendor/symfony/polyfill-mbstring/Mbstring.php(114): iconv()
#2 /path/to/freescout/vendor/symfony/polyfill-mbstring/Mbstring.php(123): Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding()
#3 [internal function]: Symfony\Polyfill\Mbstring\Mbstring::Symfony\Polyfill\Mbstring\{closure}()
#4 /path/to/freescout/vendor/symfony/polyfill-mbstring/Mbstring.php(126): array_walk_recursive()
#5 /path/to/freescout/vendor/symfony/polyfill-mbstring/bootstrap.php(52): Symfony\Polyfill\Mbstring\Mbstring::mb_convert_variables()
#6 /path/to/freescout/vendor/symfony/console/Application.php(1236): mb_convert_variables()
#7 /path/to/freescout/vendor/symfony/console/Application.php(794): Symfony\Component\Console\Application->splitStringByWidth()
#8 /path/to/freescout/vendor/symfony/console/Application.php(768): Symfony\Component\Console\Application->doRenderException()
#9 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(480): Symfony\Component\Console\Application->renderException()
#10 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(101): Illuminate\Foundation\Exceptions\Handler->renderForConsole()
#11 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(87): Illuminate\Foundation\Bootstrap\HandleExceptions->renderForConsole()
#12 /path/to/freescout/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(123): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException()
#13 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
#14 {main}
  thrown in /path/to/freescout/vendor/symfony/polyfill-mbstring/Mbstring.php on line 114

PHP Version: PHP 7.4.27
Web Server: nginx/1.21.4

@freescout-helpdesk
Copy link
Contributor

Check your console PHP version. It may be different.

@adamsewell
Copy link
Author

It is different, it appears it's trying to use PHP 8.1.2. Changing it back to php7.4 resolved this. Thanks!

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

No branches or pull requests

2 participants