The last line of the image_page function calls node_load on $last->nid, without checking whether or not $last->nid actually exists. When there aren't any images in the gallery, that results in a node_load of the empty string. In MySQL, this gets silently converted to 0, but in PostgreSQL, you get a bright red syntax error.

This patch adds a check to make sure that $last->nid is set before loading it.

Comments

Steve Simms’s picture

StatusFileSize
new1.32 KB

This is still a problem as of 4.7.2. I've updated the patch to work in the current CVS.

Any chance that someone could commit it, please?

Hetta’s picture

Version: 6.x-1.x-dev » 4.7.x-1.x-dev
Status: Needs review » Fixed

From 2006 - it's a 4.7 problem. Please reopen if this is still a problem.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.