Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-27 10:47:05

gemal
Member
From: Copenhagen, Denmark
Registered: 2007-01-09
Posts: 107
Website

bug in article_image

I found a problem in the function article_image:

In line: http://dev.textpattern.com/browser/development/4.0/textpattern/publish/taghandlers.php#L2060

$rs = safe_row(’*’, ‘txp_image’, ‘id = ‘.intval($image));
if ($rs)

will on my system PHP 5.2.1 not return false but return an empty array!
Array()

this mean that if you enter an invalid article image textpattern will crash!

because

if ($rs)

will validate to true!

Offline

#2 2007-02-27 19:24:31

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: bug in article_image

Nope.

Offline

Board footer

Powered by FluxBB