I had the same issue with CakePHP 2.0.1
I tried using
header( 'HTTP/1.1 400 BAD REQUEST' );
and
$this->header( 'HTTP/1.1 400 BAD REQUEST' );
However, neither of these solved my issue.
I did eventually resolve it by using
$this->header( 'HTTP/1.1 400: BAD REQUEST' );
After that, no errors or warning from php / CakePHP.
*edit: In the last $this->header
function call, I put a colon (:
) between the 400 and the description text of the error.