Opened 14 years ago

Closed 14 years ago

#3410 closed defect (fixed)

php mapscript saveImage() to file still writes to stdout

Reported by: warmerdam Owned by: aboudreault
Priority: normal Milestone: 6.0 release
Component: MapScript-PHP Version: svn-trunk (development)
Severity: normal Keywords:
Cc: dmorissette

Description

The script:

<?php

//phpinfo();

dl("php_mapscript.so");

$map = ms_newMapObj("test.map");

// print $map->numlayers;
 
$img = $map->draw();

$img->saveImage("out.png",$map);

?>

working against trunk is resulting in the file out.png being written and then the png encoded again and written to stdout. Is it supposed to do this? I get the impression from the docs that it should not. The problem seems to be a missing return in the save to file case in saveImage. The attached patch seems to correct the issue. I hesitate to toapply it since I'm afraid I'm missing something.

Attachments (1)

php.patch (354 bytes ) - added by warmerdam 14 years ago.
fix saveImage problem.

Download all attachments as: .zip

Change History (3)

by warmerdam, 14 years ago

Attachment: php.patch added

fix saveImage problem.

comment:1 by dmorissette, 14 years ago

Cc: dmorissette added
Milestone: 6.0 release
Owner: changed from mapserverbugs to aboudreault

I think you're right. This code has just been rewritten by Alan, so I'll let him test and apply the fix.

comment:2 by aboudreault, 14 years ago

Resolution: fixed
Status: newclosed

Thanks warmerdam.

Fixed and comitted in r10038.

Note: See TracTickets for help on using tickets.