Response. Incorrect initialization local array of status codes #11324
Closed
Description
How to reproduce
use Phalcon\Http\Response;
use Phalcon\Di;
use Phalcon\Mvc\Url;
$di = new Di();
$di->set('url', function () {
$url = new Url();
$url->setBaseUri('/');
return $url;
});
$response = new Response();
$response->setDI($di);
$response->resetHeaders();
$response->redirect('some/location/with/weird/code', false, 309);
Result
$ php test.php
Notice: Cannot use a scalar value as an array in phalcon/http/response.zep on line 480 in
/tmp/test.php on line 17
Call Stack:
0.0001 239480 1. {main}() /tmp/test.php:0
0.0002 241376 2. Phalcon\Http\Response->redirect() /tmp/test.php:17