aboutsummaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/functions.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2013-03-17 22:22:16 +0100
committerChristian Weiske <cweiske@cweiske.de>2013-03-17 22:22:16 +0100
commitd0ed9adec8084b193c3429b664a408b2a3f6b71c (patch)
tree4aac4ba43ff3bcfb4f4994ed126638f99e68a9bf /src/SemanticScuttle/functions.php
parentdefe7c0035061b2e46095dca5ed72b209ad16852 (diff)
downloadsemanticscuttle-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.php13
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);
+}
?>