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
When I run a queue with php artisan queue:work no error is displayed in CLI, but in storage/logs/laravel.log there is multiple:
[2024-04-15 13:33:19] local.ERROR: abs(): Argument #1 ($num) must be of type int|float, string given {"exception":"[object] (TypeError(code: 0): abs(): Argument #1 ($num) must be of type int|float, string given at /var/www/example.com/vendor/nesbot/carbon/src/Carbon/Traits/Units.php:162)
[stacktrace]
#0 /var/www/example.com/vendor/nesbot/carbon/src/Carbon/Traits/Units.php(162): abs()
#1 /var/www/example.com/vendor/nesbot/carbon/src/Carbon/Traits/Units.php(49): Carbon\\Carbon->addUTCUnit()
#2 /var/www/example.com/vendor/nesbot/carbon/src/Carbon/Traits/Date.php(2662): Carbon\\Carbon->addRealUnit()
#3 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Support/InteractsWithTime.php(38): Carbon\\Carbon->__call()
#4 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(278): Illuminate\\Queue\\Queue->availableAt()
#5 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(228): Illuminate\\Queue\\RedisQueue->retrieveNextJob()
#6 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(349): Illuminate\\Queue\\RedisQueue->pop()
#7 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(363): Illuminate\\Queue\\Worker->Illuminate\\Queue\\{closure}()
#8 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(162): Illuminate\\Queue\\Worker->getNextJob()
#9 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(139): Illuminate\\Queue\\Worker->daemon()
#10 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(122): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
#11 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#12 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#13 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#14 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#15 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#16 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(212): Illuminate\\Container\\Container->call()
#17 /var/www/example.com/vendor/symfony/console/Command/Command.php(279): Illuminate\\Console\\Command->execute()
#18 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(181): Symfony\\Component\\Console\\Command\\Command->run()
#19 /var/www/example.com/vendor/symfony/console/Application.php(1049): Illuminate\\Console\\Command->run()
#20 /var/www/example.com/vendor/symfony/console/Application.php(318): Symfony\\Component\\Console\\Application->doRunCommand()
#21 /var/www/example.com/vendor/symfony/console/Application.php(169): Symfony\\Component\\Console\\Application->doRun()
#22 /var/www/example.com/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(196): Symfony\\Component\\Console\\Application->run()
#23 /var/www/example.com/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#24 {main}
"}
I think this is due to Carbon using declare(strict_types=1); in carbon/src/Carbon/Traits/Units.php. When $unit = "second", the $value is never cast/converted to float|int.
Carbon version is 3.2.4
Steps To Reproduce
Just run a queue worker. No jobs are actually queued.
The text was updated successfully, but these errors were encountered:
We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?
Laravel Version
11.3.1
PHP Version
8.3.6
Database Driver & Version
No response
Description
When I run a queue with php artisan queue:work no error is displayed in CLI, but in storage/logs/laravel.log there is multiple:
I think this is due to Carbon using
declare(strict_types=1);
incarbon/src/Carbon/Traits/Units.php
. When$unit = "second"
, the $value is never cast/converted to float|int.Carbon version is 3.2.4
Steps To Reproduce
Just run a queue worker. No jobs are actually queued.
The text was updated successfully, but these errors were encountered: