ZF-5907: _setupPrimaryKey: array_intersect incorrect
Description
Since version 1.7.0 I get the error on row 772 of Zend/Db/Table/Abstract.php. When debugging I see that the array_intersect parameters can never get a positive result:
$cols is an array with the following content:
Array
(
[account_id] => Array
(
[SCHEMA_NAME] =>
[TABLE_NAME] => account
[COLUMN_NAME] => account_id
[COLUMN_POSITION] => 1
[DATA_TYPE] => bigint
[DEFAULT] =>
[NULLABLE] =>
[LENGTH] =>
[SCALE] =>
[PRECISION] =>
[UNSIGNED] => 1
[PRIMARY] => 1
[PRIMARY_POSITION] => 1
[IDENTITY] => 1
)
[accounttype_id] => Array
(
[SCHEMA_NAME] =>
[TABLE_NAME] => account
[COLUMN_NAME] => accounttype_id
[COLUMN_POSITION] => 2
[DATA_TYPE] => bigint
[DEFAULT] => 1
[NULLABLE] =>
[LENGTH] =>
[SCALE] =>
[PRECISION] =>
[UNSIGNED] =>
[PRIMARY] =>
[PRIMARY_POSITION] =>
[IDENTITY] =>
)
....
$this->_primary contains an array with the following content:
Array
(
[1] => account_id
)
Can somebody please confirm this is a bug?
Comments
Posted by Marc van de Geijn (bhosted) on 2009-02-27T06:51:10.000+0000
I've created a workaround for this issue:
{{monospaced}} } else if (isset($this->_primary[0])) { array_unshift($this->_primary, null); unset($this->_primary[0]); }
Posted by Marc van de Geijn (bhosted) on 2009-03-11T01:56:20.000+0000
After more debugging I found out that this was not in issue in the Framework, but in my own code. Unfortunatly, I can not find an option to close this issue myself.