PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject » Bug #4871

notice thrown

Details

Submitted2005-07-20 14:10 UTC
Fromjeroen at terena dot nl
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version5.0.4
OSDebian
Roadmaps(Not assigned)

Comments

[2005-07-20 14:10 UTC] jeroen at terena dot nl

Description:
------------
DB_dataobject 1.7.15

This line:
if (!($table[$usekey] & DB_DATAOBJECT_INT)) {

Throws a notice Undefined index: players_player_id in /usr/local/share/php/pear/DB/DataObject.php on line 1934

The update() that causes this notice works fine though. Code fragment below:

$qf = $form->exportValues();
$player = new Players;
$player->email = $qf['username'];
// player->email is a unique key, but not a primary key

if ($player->find(true) !== 1) {
continue;
}
$code = md5(uniqid());
$player->activation_code = $code;

$player->update();

players_player_id is the name of my postgresql sequence and primary key associated with my players table.

Reproduce code:
---------------
Full code is too long, see code fragment in description

Expected result:
----------------
Same result, without throwing the notice

Actual result:
--------------
Notice: Undefined index: players_player_id in /usr/local/share/php/pear/DB/DataObject.php on line 1934

[2005-08-04 07:37 UTC] jeroen at terena dot nl

Sorry for the delay - I was on holidays.

Tried CVS and it works, no notices anymore, thanks!

[2005-08-04 07:39 UTC] jeroen at terena dot nl

forgot the change the statusto closed