diff options
author | Christian Weiske <cweiske@cweiske.de> | 2013-03-17 22:22:16 +0100 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2013-03-17 22:22:16 +0100 |
commit | d0ed9adec8084b193c3429b664a408b2a3f6b71c (patch) | |
tree | 4aac4ba43ff3bcfb4f4994ed126638f99e68a9bf /src/SemanticScuttle/functions.php | |
parent | defe7c0035061b2e46095dca5ed72b209ad16852 (diff) | |
download | semanticscuttle-d0ed9adec8084b193c3429b664a408b2a3f6b71c.tar.gz semanticscuttle-d0ed9adec8084b193c3429b664a408b2a3f6b71c.tar.bz2 |
remove php4-style object reference passing
Diffstat (limited to 'src/SemanticScuttle/functions.php')
-rw-r--r-- | src/SemanticScuttle/functions.php | 13 |
1 files changed, 13 insertions, 0 deletions
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 "<html>\n<body>\n". $msg_title ."\n<br /><br />\n". $msg_text ."</body>\n</html>"; 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); +} ?> |