Details
-
Improvement
-
Resolution: Unresolved
-
High
-
5.4.9, 1.9.0
-
None
Description
In the EzPublishLegacyBundle/LegacyResponse/LegacyResponseManager.php file, mapHeaders() method, it's possible that the $header is empty or malformed what will result in unnecessary undefined index and undefined offset warnings
public function mapHeaders( array $headers, Response $response ) { foreach ( $headers as $header ) { $headerArray = explode( ": ", $header, 2 ); $headerName = strtolower( $headerArray[0] ); $headerValue = $headerArray[1];
It's important that these warnings are handled and to check if the indexes exist before trying to execute any code.