mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixes failing tests
This commit is contained in:
parent
013ecc3f9f
commit
34bfeba15d
2 changed files with 2 additions and 2 deletions
|
@ -303,7 +303,7 @@ class CakeRequest implements ArrayAccess {
|
|||
return $this->base = $base;
|
||||
}
|
||||
|
||||
if (!$baseUrl) {
|
||||
if (empty($baseUrl)) {
|
||||
$base = dirname(env('PHP_SELF'));
|
||||
// Clean up additional / which cause following code to fail..
|
||||
$base = preg_replace('#/+#', '/', $base);
|
||||
|
|
|
@ -126,7 +126,7 @@ abstract class ObjectCollection {
|
|||
}
|
||||
$result = null;
|
||||
foreach ($list as $name) {
|
||||
$result = call_user_func_array(array($this->_loaded[$name], $callback), compact('subject') + $params);
|
||||
$result = call_user_func_array(array($this->_loaded[$name], $callback), array_filter(compact('subject')) + $params);
|
||||
if ($options['collectReturn'] === true) {
|
||||
$collected[] = $result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue