From efb274791e8bdfbab596428e0fb29aa9b960ae24 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Tue, 26 Dec 2017 18:09:50 +0000 Subject: [PATCH] Replace deprecated create_function with an anonymous function. --- modules/casserver/www/serviceValidate.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/casserver/www/serviceValidate.php b/modules/casserver/www/serviceValidate.php index cf4bd0af2..b0deead91 100644 --- a/modules/casserver/www/serviceValidate.php +++ b/modules/casserver/www/serviceValidate.php @@ -53,9 +53,13 @@ try { $pgtiouxml = "\n<cas:proxyGrantingTicket>$pgtiou</cas:proxyGrantingTicket>\n"; } - $proxiesxml = join("\n", array_map(create_function('$a', 'return "<cas:proxy>$a</cas:proxy>";'), $ticketcontent['proxies'])); - if ($proxiesxml) $proxiesxml = "<cas:proxies>\n$proxiesxml\n</cas:proxies>\n"; - returnResponse('YES', $function, $attributes[$usernamefield][0], $dosendattributes ? $attributes : array(), $pgtiouxml.$proxiesxml); + $proxiesxml = join("\n", array_map( + function($a) { return "<cas:proxy>$a</cas:proxy>"; }, + $ticketcontent['proxies'])); + if ($proxiesxml) { + $proxiesxml = "<cas:proxies>\n$proxiesxml\n</cas:proxies>\n"; + } + returnResponse('YES', $function, $attributes[$usernamefield][0], $dosendattributes ? $attributes : array(), $pgtiouxml.$proxiesxml); } else { returnResponse('NO', $function); } -- GitLab