You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!is_array($list) && !$listinstanceof \Traversable) {
$list = [$list];
}
foreach ($listas$item) {
$injected = (yield$item);
if ($injected === static::$STOP_GENERATOR) {
break;
}
}
if (is_callable($callback)) {
$this->callback();
}
}
We check to see if $callback is callable, but then we call $this->callback() instead of $callback().
Is this intentional? If so, shouldn't $callback just be boolean?
The text was updated successfully, but these errors were encountered:
nathanbrauer
changed the title
Checking if $callback is callable, but calling $this->callback()
Checking if $callback is callable, but then calling $this->callback()Oct 19, 2023
Regarding this portion....
silverstripe-salsify/src/Traits/Yieldable.php
Lines 36 to 38 in 6068d6c
...of this method...
silverstripe-salsify/src/Traits/Yieldable.php
Lines 17 to 39 in 6068d6c
We check to see if
$callback
is callable, but then we call$this->callback()
instead of$callback()
.Is this intentional? If so, shouldn't
$callback
just be boolean?The text was updated successfully, but these errors were encountered: