Inside http_response_headers.install file, in the line 24, this if operation is wrong:
$strict_transport_security instanceof ResponseHeaderInterface
Is wrong because according PHP documentation http://php.net/manual/en/internals2.opcodes.instanceof.php, When checking instanceof against a class that implements a interface, it will return true.

inside ResponseHeader.php, the class ResponseHeader implements ResponseHeaderInterface

Comments

pierre@edumobi.com.br’s picture

This bug still presents in 8.x-2.x version as well

gapple’s picture

It looks like the intent of the if statement is to 1. check that a header is configured 2. that it implements the expected interface and 3. that it has a non-empty value.

Checking against the interface is correct, but in this case should be negated: !($strict_transport_security instanceof ResponseHeaderInterface). It is probably superfluous though, since the entity manager should only return entities of the expected type.

MykolaVeryha’s picture

minnur’s picture

Status: Active » Fixed
minnur’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.