Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding incomplete docblock to new _parseClosures() method.

  • Loading branch information...
commit c86c2c779395edf82f1c14273736f9d595f163c3 1 parent 085f4bb
Richard Vanbergen authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 extensions/adapter/security/access/AuthRbac.php
View
16 extensions/adapter/security/access/AuthRbac.php
@@ -122,11 +122,25 @@ public static function parseMatch($match, $request) {
return true;
}
+ /**
+ * _parseClosures Itterates over an array and runs any anonymous functions it
+ * finds. Returns true if all of the closures it runs evaluate to true. $match
+ * is passed by refference and any closures found are removed from it before the
+ * method is complete.
+ *
+ * @param array $data
+ * @param mixed $request
+ * @static
+ * @access protected
+ * @return void
+ */
protected static function _parseClosures(array &$data = array(), $request = null) {
$return = true;
foreach ($data as $key => $item) {
if (is_callable($item)) {
- $return = $item($request);
+ if ($return === true) {
+ $return = (boolean) $item($request);
+ }
unset($data[$key]);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.