From a0312523252690a86b09e26d1ccf1dbe5b8ad729 Mon Sep 17 00:00:00 2001 From: tkaven Date: Thu, 1 Sep 2016 12:56:19 +0800 Subject: [PATCH] if no header defined should return null isset($req->getHeaders()[ 'abc' ]) To null !== $req->getHeader('abc') --- phalcon/http/request.zep | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phalcon/http/request.zep b/phalcon/http/request.zep index 554b8dc47ba..2b6448ff100 100755 --- a/phalcon/http/request.zep +++ b/phalcon/http/request.zep @@ -260,7 +260,7 @@ class Request implements RequestInterface, InjectionAwareInterface /** * Gets HTTP header from request data */ - public final function getHeader(string! header) -> string + public final function getHeader(string! header) -> string | null { var value, name; @@ -274,7 +274,7 @@ class Request implements RequestInterface, InjectionAwareInterface return value; } - return ""; + return null; } /**