Skip to content

PHP 8.5 : Using null as an array offset is deprecated, use an empty string instead in : LaravelLocalization.php #953

@Ronan-Lenor

Description

@Ronan-Lenor

Describe the bug
local.WARNING: Using null as an array offset is deprecated, use an empty string instead in ...\vendor\mcamara\laravel-localization\src\Mcamara\LaravelLocalization\LaravelLocalization.php on line s:

  • 174
  • 443
  • 455
  • and probably lot more ...

To Reproduce
use PHP 8.5

Expected behavior
no more deprecated logs

More info:
https://www.php.net/manual/en/migration85.deprecated.php
Search for "array offset"

TODO:

// search for every [$locale] & $locale =
// and do some changes such as :
$locale = null
$locale = ''

$locale = ...->aFunctionSomewhere()
$locale = strval(...->aFunctionSomewhere())

// also check conditions that rely on null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions