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 authored and MatthieuLP committed 2022-07-18 13:24:49 +02:00
1 parent f603bafe70
commit 97407ef5b1
1 file changed
+1 -1
+1 -1
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))
{