Skip to content

Commit 2b30a07

Browse files
author
Till Brehm
committed
Merge branch '6231-php-5-4-incompatibility-array_column' into 'develop'
Resolve "php 5.4 incompatibility array_column" Closes #6231 See merge request ispconfig/ispconfig3!1524
2 parents 84a35dd + ac7b645 commit 2b30a07

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/plugins-available/webserver_plugin.inc.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31+
/* compatibility for php < 5.5 (centos 7), remove when no longer needed */
32+
if(!function_exists("array_column")){
33+
function array_column($array,$column_name){
34+
return array_map(function($element) use($column_name){return $element[$column_name];}, $array);
35+
}
36+
}
37+
3138
class webserver_plugin {
3239

3340
var $plugin_name = 'webserver_plugin';

0 commit comments

Comments
 (0)