Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A non well formed numeric value encountered in var/www/html/admin/vendor/nesbot/carbon/src/Carbon/Traits/Units.php

I am using laravel 5.8.

I am getting an exception in file /var/www/html/admin/vendor/nesbot/carbon/src/Carbon/Traits/Units.php at line

       // @call addRealUnit
            case 'minute':
            $value *= static::SECONDS_PER_MINUTE;
            break;

I am using AWS server.

I am trying to run composer update but I am getting this error :

[Composer\Downloader\TransportException]
The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to op
en stream: Connection timed out

like image 879
Rishikesh Singh Avatar asked Dec 13 '22 10:12

Rishikesh Singh


1 Answers

Looks like the new warning in PHP 7.1

Probably you have an empty SESSION_LIFETIME in the .env which cause this warning by calling the addRealUnit($unit, $value = 1) with the $value = ""

Solution: Update the .env and set a value to SESSION_LIFETIME or remove the SESSION_LIFETIME and the problem should be solved.

like image 116
Benjamin Avatar answered Jan 13 '23 11:01

Benjamin