freebsd-ports/graphics/mapserver/files/extra-patch-mapscript-php-image.c
Wen Heping e245edb2b8 - Update to 6.0.3 and unbreak
- Convert to optionsNG
- Fix the build of PHP option with the upstream patch
2012-09-05 07:57:30 +00:00

26 lines
678 B
C

--- mapscript/php/image.c.orig 2012-09-05 14:29:49.000000000 +0800
+++ mapscript/php/image.c 2012-09-05 14:31:04.000000000 +0800
@@ -303,11 +303,18 @@
/* no filename - read stdout */
/* if there is no output buffer active, set the header */
- if (OG(ob_nesting_level)<=0)
- {
- php_header(TSRMLS_C);
- }
-
+ //handle changes in PHP 5.4.x
+ #if PHP_VERSION_ID < 50399
+ if (OG(ob_nesting_level)<=0)
+ {
+ php_header(TSRMLS_C);
+ }
+ #else
+ if (php_output_get_level(TSRMLS_C)<=0)
+ {
+ php_header(TSRMLS_C);
+ }
+ #endif
if (MS_RENDERER_PLUGIN(php_image->image->format))
{