From 97407ef5b1814161e85521eade4448dc7214f22b Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Thu, 7 Jul 2022 09:20:36 +0800 Subject: [PATCH] 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 --- admin/include/plugins.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/include/plugins.class.php b/admin/include/plugins.class.php index 313f3624f..9f2227b75 100644 --- a/admin/include/plugins.class.php +++ b/admin/include/plugins.class.php @@ -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)) {