Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Phalcon\Http\Response getStatusCode() returns full string instead of int code #12895
Expected and Actual Behavior
Actual result is:
$res = new Phalcon\Http\Response(); $res->setStatusCode(422); var_dump($res->getStatusCode());
Exactly same code works w/o this issue on PHP 5.6.30 and same Phalcon version / setup.
Well now I'm not sure whenever the issue was PHP 5 or my Database default values. More precisely, if database had column defined as int
Nevertheless, this is definitely a bug - now confirmed exact same behavior on both PHP 5.6.30 and PHP 7.0.x. As we can see in zephir sources, surely this method will return full string, which is not desirable.