Page MenuHomePhabricator

Fix "ord(): Providing an empty string is deprecated" PHP 8.5 warning in Less_Parser
Closed, ResolvedPublic

Description

The new php85 job is failing, this is one of the issues preventing it from passing:

1) /src/lib/Less/Parser.php:1585
PHP Deprecated: ord(): Providing an empty string is deprecated

Event Timeline

See also: T338103: Micro-optimize ApiResult::isMetadataKey with str_starts_with once we support PHP8+

ord() has a few issues, requiring changes and guarding... It may make more sense to use other functions.

Hokwelum changed the task status from Open to In Progress.Dec 4 2025, 3:45 PM

Change #1218783 had a related patch set uploaded (by Hokwelum; author: Hokwelum):

[mediawiki/libs/less.php@master] Less_Parser: Fix ord(): Providing an empty string is deprecated PHP 8.5 warning

https://gerrit.wikimedia.org/r/1218783

Change #1218783 merged by jenkins-bot:

[mediawiki/libs/less.php@master] Less_Parser: Fix "ord(): Providing an empty string is deprecated" PHP 8.5 warning

https://gerrit.wikimedia.org/r/1218783