joomla/joomla-platform

sqlsrv insertObject including nulls

MDunkleSr opened this issue · 2 comments

In JDatabase->insertObject non-null scalars are excluded. In JDatabaseSQLSrv->insertObject null values are being included. I'm wondering if there's a reason for the divergent behavior?

JDatabase->insertObject uses the following (line 822, 823):
// Only process non-null scalars.
if (is_array($v) or is_object($v) or $v === null)

JDatabaseSQLSrv->insertObject is using (line 533):
if (is_array($v) or is_object($v))

I would argue that the behavior should be the same, and the if statement from JDatabase be used in JDatabaseSQLSrv.

@MDunkleSr You can browse to the file and edit it, then propose the change.

Also close this this one please.