PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB2 » Bug #3709

quote() translates '' to NULL using portability mode

Details

Submitted2005-03-05 06:38 UTC
Fromceefour at gauldong dot net
StatusBogus
PackageMDB2
PHP Version5.0.3
OSAll
Roadmaps(Not assigned)

Comments

[2005-03-05 06:38 UTC] ceefour at gauldong dot net

Description:
------------
The latest MDB CVS has another quirk: quote() translates '' to NULL when
EMPTY_TO_NULL portability mode is enabled. This breaks a lot of
applications, as now it is impossible to INSERT an empty string to a NOT
NULL string column. IMHO EMPTY_TO_NULL is only used for retrieving data,
not for quoting input to a query. Therefore, for quoting, empty strings
should be translated to '' no matter what the portability option says.

I understand if Oracle translates '' to NULLs when retrieving data, but I
don't believe that it doesn't accept '' for input.

[2005-03-06 17:05 UTC] smith at backendmedia dot com

This behaviour is intentional. Disable the portability option if you dont require it. I have added a test to the test suite to illustrate the requirement for this test.