[mapserver-commits] r10066 - in trunk/mapserver: . mapscript/php

svn at osgeo.org svn at osgeo.org
Wed Apr 7 11:09:50 EDT 2010


Author: aboudreault
Date: 2010-04-07 11:09:47 -0400 (Wed, 07 Apr 2010)
New Revision: 10066

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapscript/php/image.c
Log:
Fixed imageObj->saveImage() sends unnecessary headers (#3418)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2010-04-07 13:37:57 UTC (rev 10065)
+++ trunk/mapserver/HISTORY.TXT	2010-04-07 15:09:47 UTC (rev 10066)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fixed imageObj->saveImage() sends unnecessary headers (#3418)
+
 - Avoid automatically regenerating maplexer.c (#2310)
 
 - Change rounding rules for average resampling (#1932)

Modified: trunk/mapserver/mapscript/php/image.c
===================================================================
--- trunk/mapserver/mapscript/php/image.c	2010-04-07 13:37:57 UTC (rev 10065)
+++ trunk/mapserver/mapscript/php/image.c	2010-04-07 15:09:47 UTC (rev 10066)
@@ -31,6 +31,7 @@
 
 #include "php_mapscript.h"
 #include "ext/standard/head.h"
+#include "main/php_output.h"
 
 zend_class_entry *mapscript_ce_image;
 
@@ -293,7 +294,12 @@
 
     /* no filename - read stdout */
 
-    php_header(TSRMLS_C);
+    /* if there is no output buffer active, set the header */
+    if (OG(ob_nesting_level)<=0)
+    {
+        php_header(TSRMLS_C);
+    }
+   
 
     if( MS_DRIVER_GD(php_image->image->format) || MS_DRIVER_AGG(php_image->image->format))
     {



More information about the mapserver-commits mailing list