From ac7b645dd4108f0007be71e9ad33e56c3dd6d99f Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Thu, 9 Sep 2021 16:57:58 -0600
Subject: [PATCH] add array_column function if not exists

---
 server/plugins-available/webserver_plugin.inc.php | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/server/plugins-available/webserver_plugin.inc.php b/server/plugins-available/webserver_plugin.inc.php
index 7d307233d8..bb884a6e2b 100644
--- a/server/plugins-available/webserver_plugin.inc.php
+++ b/server/plugins-available/webserver_plugin.inc.php
@@ -28,6 +28,13 @@
   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/* compatibility for php < 5.5 (centos 7), remove when no longer needed */
+if(!function_exists("array_column")){
+	function array_column($array,$column_name){
+		return array_map(function($element) use($column_name){return $element[$column_name];}, $array);
+	}
+}
+
 class webserver_plugin {
 
 	var $plugin_name = 'webserver_plugin';
-- 
GitLab