Page MenuHomePhabricator

select_position Database Call Broken
Closed, ResolvedPublic

Description

Author: gregory.szorc

Description:
On line 230 of the most recent version of database.php a call to array_merge is
made. The first argument to this function is a string, where it should be an
array. This causes the WHERE statement to be truncated to nothing. To fix
this, change the line to read:

array_merge(array($condition) , array( 'page_id = gis_page' ) )

I am not sure if earlier versions of PHP allow a parameter to be a string, but I
can definitely say there is an issue with PHP 5.1.x.


Version: unspecified
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz5301

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:10 PM
bzimport set Reference to bz5301.
bzimport added a subscriber: Unknown Object (MLST).

This has already been fixed in subversion. At least, it appears that
database.php has been split into GisDatabase.php and geo.php, and neither of
them now use array_merge. Thanks for the report.