From 649e73c89b17495a06e4551e259b0e8cb0c9746c Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 8 Mar 2021 14:27:35 +0100 Subject: [PATCH] fixes #1334 change syntax to be compatible with PHP 5.3 --- include/ws_functions/pwg.groups.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ws_functions/pwg.groups.php b/include/ws_functions/pwg.groups.php index c0c664ba1..23b8dec3f 100644 --- a/include/ws_functions/pwg.groups.php +++ b/include/ws_functions/pwg.groups.php @@ -334,7 +334,7 @@ function ws_groups_duplicate($params, &$service) { $query = ' SELECT COUNT(*) FROM `'.GROUPS_TABLE.'` - WHERE name = \''.$params['copy_name'].'\' + WHERE name = \''.pwg_db_real_escape_string($params['copy_name']).'\' ;'; list($count) = pwg_db_fetch_row(pwg_query($query)); if ($count != 0) @@ -359,7 +359,7 @@ SELECT is_default WHERE id = '.$params['group_id'].' ;'; - $is_default = pwg_db_fetch_row(pwg_query($query))[0]; + list($is_default) = pwg_db_fetch_row(pwg_query($query)); // creating the group single_insert(