From d0ed9adec8084b193c3429b664a408b2a3f6b71c Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 17 Mar 2013 22:22:16 +0100 Subject: remove php4-style object reference passing --- src/SemanticScuttle/functions.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/SemanticScuttle/functions.php') diff --git a/src/SemanticScuttle/functions.php b/src/SemanticScuttle/functions.php index 09f7cf3..802a7f1 100644 --- a/src/SemanticScuttle/functions.php +++ b/src/SemanticScuttle/functions.php @@ -276,4 +276,17 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', echo "\n\n". $msg_title ."\n

\n". $msg_text ."\n"; exit; } + +/** + * Calls reset() on the given arg, without the E_STRICT error + * "Only variables should be passed by reference" + * + * @param array $arg Array to return first element of + * + * @return mixed First element of the array + */ +function rreset($array) +{ + return reset($array); +} ?> -- cgit v1.2.3