PHP 8.1 deprecation: don't pass null to file_get_contents()

This fixes the following PHP 8.1 deprecation notice:

> file_get_contents(): Passing null to parameter #2
> ($use_include_path) of type bool is deprecated in
> piwigo/admin/include/plugins.class.php on line 294
This commit is contained in:
Sam Wilson
2022-07-07 09:20:36 +08:00
committed by MatthieuLP
parent f603bafe70
commit 97407ef5b1

View File

@@ -291,7 +291,7 @@ DELETE FROM '. PLUGINS_TABLE .'
'author'=>'',
'hasSettings'=>false,
);
$plg_data = file_get_contents($path.'/main.inc.php', null, null, 0, 2048);
$plg_data = file_get_contents($path.'/main.inc.php', false, null, 0, 2048);
if (preg_match("|Plugin Name:\\s*(.+)|", $plg_data, $val))
{