aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/elgglib.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index dc39a6204..26c6be743 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -948,10 +948,7 @@ function elgg_register_plugin_hook_handler($hook, $type, $callback, $priority =
return FALSE;
}
- $priority = (int) $priority;
- if ($priority < 0) {
- $priority = 0;
- }
+ $priority = max((int) $priority, 0);
while (isset($CONFIG->hooks[$hook][$type][$priority])) {
$priority++;