We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 236b93f commit 5d903f6Copy full SHA for 5d903f6
lib/Toby/Base.php
@@ -69,9 +69,10 @@ public function content_type($type = null, $params = array())
69
70
public function error()
71
{
72
- $codes = (func_num_args() > 1)? array_shift(func_get_args()) : array("all");
+ $args = func_get_args();
73
+ $codes = (count($args) > 1)? array_shift($args) : array("all");
74
if(!is_array($codes)) $codes = array($codes);
- $block = array_pop(func_get_args());
75
+ $block = array_pop($args);
76
foreach($codes as $code) $this->errors[$code] = $block;
77
}
78
0 commit comments