laminas / laminas-stdlib

SPL extensions, array utilities, error handlers, and more
https://docs.laminas.dev/laminas-stdlib/
BSD 3-Clause "New" or "Revised" License
190 stars 40 forks source link

Allow null argument to strlen #30

Closed ittmann closed 3 years ago

ittmann commented 3 years ago

Resolves a BC break introduced in 3.4.0 A Fatal Error is thrown when null is passed to StringWrapper/Intl:strlen which was not the case in previous versions

Closes #29

Ocramius commented 3 years ago

See https://github.com/laminas/laminas-escaper/issues/20

The correct resolution for this is potentially something like https://github.com/laminas/laminas-escaper/pull/23, not relaxing input types.

The signature of this method has always required a string as input.