Fixes failing tests

This commit is contained in:
Joe 2018-09-03 00:45:34 -04:00
parent 013ecc3f9f
commit 34bfeba15d
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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;
}