In implementing the php-fpm fix/workaround as detailed at: http://www.magentocommerce.com/boards/v/viewthread/229253/#t383462

It results in "Undefined index: content-type" entries in the system.log for lines 107,114, and 123:

107: if ($sent[$name])
114: if (!is_null($existing = $headers[$name]))
123: if (!is_null($existing = $headersRaw[$name]))

Is there a cleaner way of implementing this fix to avoid these notices?


You could probably use array_key_exists:

if (array_key_exists('$name', $sent))

You might want to combine it to check that the value isn't blank? So your 3 lines might be:

if (array_key_exists($name, $sent) && trim($sent[$name]) != "")
if (array_key_exists($name, $headers) && !is_null($existing = $headers[$name]))
if (array_key_exists($name, $headersRaw) && !is_null($existing = $headersRaw[$name]))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.