Skip to content

Commit ac7b645

Browse files
committed
add array_column function if not exists
1 parent 84a35dd commit ac7b645

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)