PEAR is archived and read-only

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

Home » Authentication » LiveUser » Bug #1670

group_define_name doesn't accept NULL values

Details

Submitted2004-06-17 16:59 UTC
Fromxav at spotk dot net
Assignedlsmith
StatusNo Feedback
PackageLiveUser
PHP Version4.3.7
OSlinux debian sarge
Roadmaps(Not assigned)

Comments

[2004-06-17 16:59 UTC] xav at spotk dot net

Description:
------------
maybe there is a quirk in : LiveUser_Admin_Perm_Container_DB_Medium::addGroup()

this method have the following params:
$group_name,
$group_description = null,
$active = false,
$define_name = null,
$group_type = LIVEUSER_GROUP_TYPE_ALL,
$customFields = array())

$define_name have null as default.

So a generated SQL query could be:

INSERT INTO liveuser_groups
(group_id, group_type, group_define_name, is_active)
VALUES
( 5, 1, NULL, 'Y' )

But, the table in the sql schema is designed as:

CREATE TABLE liveuser_groups (
group_id int(11) unsigned NOT NULL default '0',
group_type int(11) unsigned default '1',
group_define_name varchar(32) NOT NULL default '',
owner_user_id int(11) unsigned default NULL,
owner_group_id int(11) unsigned default NULL,
is_active char(1) NOT NULL default 'N',
PRIMARY KEY (group_id),
UNIQUE KEY group_define_name (group_define_name)
) TYPE=MyISAM;

Actual result:
--------------
group_define_name doesn't accept NULL values, so the method can return an SQL error, and this is my case :)

[nativecode=ERROR: null value in column "group_define_name" violates not-null constraint]

[2004-06-17 17:57 UTC] smith at backendmedia dot com

I want to hold of a fix for this release until after 0.12.0.

[2004-06-21 20:30 UTC] smith at backendmedia dot com

please check the updated version in CVS

[2004-10-11 11:31 UTC] smith at backendmedia dot com

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.