Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
2011.6
-
None
-
Operating System: Ubuntu
PHP Version: 5.3.2
Description
I get invalid header errors after upgrading to 2011.6.
I tracked the issue down to operator precedence in php.
When a string and ternary operator are concatenated you need to surround the ternary of you get the boolean value concatenated.
The issue is in /lib/ezfile/classes/ezfile.php
line 253 has
header(
"Content-Disposition: " .
( $isAttachedDownload ? 'attachment' : 'inline' ) .
( $overrideFilename !== false ) ? "; filename={$overrideFilename}" : ''
);
should have
header(
"Content-Disposition: " .
( $isAttachedDownload ? 'attachment' : 'inline' ) .
(( $overrideFilename !== false ) ? "; filename={$overrideFilename}" : '')
);