Ticket #234 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Mapguide utility function cause LoadMap to fail

Reported by: beginbenoit Owned by: madair
Priority: P2 Milestone: Future
Component: MapGuide Version: 2.0 - beta
Severity: Major Keywords:
Cc: External ID:
state: New Browser: All
Operating System: All

Description

In fusion\layers\MapGuide\php\Utility.php, the function ByteReaderToString? will cause LoadMap?.php calls to unexpectedly terminate during the building of the JSON. The code in its current state likely uses the maximum amount of memory available for the process to run and PHP throws an exception that I was unfortunately unable to trap. The function should be changed to use the built-in ToString? function of the MgByteReader?.

function ByteReaderToString($byteReader)
{
    return $byteReader->ToString();
}

It would be possible to add some validation to prevent any issues, such as calling GetMimeType? to validate that the ToString? will return something that is the actual textual representation of the content held in it.

Change History

Changed 4 years ago by madair

  • status changed from new to closed
  • resolution set to fixed

(In [1823]) closes #234: use built-in methods where appropriate

Note: See TracTickets for help on using tickets.