Bug #9585

PDOException thrown if array contains NULL as value

Added by Robert Lemke about 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Start date:
2010-09-03
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

Description

SQLSTATE[HY000]: General error: 1 table properties_data has no column named null
10 PDO::prepare("INSERT INTO "properties_data" ("parent", "name", "index", "type", "null") VALUES (?, ?, ?, ?, ?)")
9 F3\FLOW3\Persistence\Backend\GenericPdo\Backend::storePropertyData("bc924de7-72e7-420e-9019-96fda74d1c4a", "contentObject", array)
8 F3\FLOW3\Persistence\Backend\GenericPdo\Backend::setProperties(array, 1)
7 F3\FLOW3\Persistence\Backend\GenericPdo\Backend::persistObject(F3\TYPO3CR\Domain\Model\Node_AOPProxy_Development)
6 F3\FLOW3\Persistence\Backend\AbstractBackend::persistObjects()

This happens if you try to persist an array as follows:

   protected $myVar = array(0 => NULL);

Associated revisions

Revision db9e49c6 (diff)
Added by Karsten Dambekalns about 9 years ago

[+BUGFIX] FLOW3 (Persistence): Allow NULL values in arrays

NULL values inside an array caused an exception (unknown column null).

Change-Id: I7f0955373ec324990bea75f68afd09326a993401
Fixes: #9585

History

#1 Updated by Robert Lemke about 9 years ago

  • Status changed from Accepted to Under Review

#2 Updated by Karsten Dambekalns about 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF