Fix for the fix - bug #1 revisited

at 2006-05-24 in GeneralHomepage by friebe (0 comments)

While searching for the origins of an SQLException which was occuring in our corporate Intranet, we discovered it had been caused by the numval() method introduced into the rdbms.StatementFormatter class a couple of weeks ago.

The problem was that numval() was being passed an empty string and was producing an empty string in return, causing "select ... from news where parent_id= %d" to be formatted to "select ... from news where parent_id= ", resulting in the afforementioned exception with the message "Incorrect syntax near ...".

The problem was that sscanf() returns -1 for empty input values and has been fixed now (see http://bugs.xp-framework.net/show_bug.cgi?id=1#c7 for details).



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases

Related

Find related articles by a search for «Fix».