linkinfo() Rejects An Empty Path¶
linkinfo() used to accept an empty string as its path argument, emit a warning and return -1. In PHP 8.6, an empty path throws a ValueError.
PHP code¶
<?php
var_dump(linkinfo(''));
?>
Before¶
PHP Warning: linkinfo(): No such file or directory
Warning: linkinfo(): No such file or directory
int(-1)
After¶
linkinfo(): Argument #1 ($path) must not be empty
PHP version change¶
This behavior changed in 8.6