Problem with PEAR_Error in serializer

A place for users and developers of the Xataface to discuss and receive support.

Postby perseqtor » Mon Oct 15, 2007 9:45 am

I recently upgraded to 7.1 and I've ironed out most of the obvious kinks but I'm still getting this error after I login:

Fatal error: Cannot use object of type PEAR_Error as array in /sao/apache/dataface/Dataface/Serializer.php on line 75


Here's my SQL dumps for the two tables:

CREATE TABLE `case` (
`CaseID` int(11) NOT NULL auto_increment,
`FirstName` varchar(15) NOT NULL,
`LastName` varchar(25) NOT NULL,
`DateofBirth` date default NULL,
`Attorney` varchar(25) default NULL,
`DocketNumber` varchar(15) default NULL,
`OriginalCharge` char(5) default NULL,
`OriginalChargeClass` tinyint(3) default NULL,
`OffenseDate` date default NULL,
`ReportNumber` varchar(15) default NULL,
`DocumentControlNumber` varchar(20) default NULL,
`DispoCharge` char(5) default NULL,
`DispoChargeClass` tinyint(3) default NULL,
`DispoDate` date default NULL,
`Courtroom` smallint(6) default NULL,
`HighProfile` tinyint(1) default NULL,
`DispoType` char(2) default NULL,
`DispoMonths` tinyint(2) default NULL,
`Jailtime` smallint(6) default NULL,
`AssignedASA` varchar(4) default NULL,
`InvestigatingAgency` varchar(4) default NULL,
`FelonyReview` varchar(50) default NULL,
`UserID` smallint(6) NOT NULL,
`CaseStatus` tinyint(4) default NULL,
`HearingDate` date default NULL,
PRIMARY KEY (`CaseID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=791 ;

CREATE TABLE IF NOT EXISTS `users` (
`UserID` smallint(6) NOT NULL,
`UserFirstName` varchar(15) NOT NULL,
`UserLastName` varchar(25) NOT NULL,
`UserName` varchar(15) NOT NULL,
`PassWord` varchar(10) NOT NULL,
`Role` enum('READ ONLY','NO ACCESS','ADMIN','EDIT','DELETE','OWNER','USER') NOT NULL default 'USER',
`Photograph` tinyblob,
`OfficeLine` varchar(12) NOT NULL,
`Cellphone` varchar(12) default NULL,
`Pager` varchar(12) default NULL,
`LastAccess` timestamp NOT NULL,
`UserDateofBirth` date default NULL,
`InOrOut` tinyint(1) default NULL,
`ASA` tinyint(1) default NULL,
`Courtroom` smallint(6) default NULL,
PRIMARY KEY (`UserID`)
) TYPE=MyISAM ;
perseqtor
 
Posts: 11
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Oct 15, 2007 11:25 am

Hmmm tricky to debug with just this... try adding a little debugging code just before line 75 of Dataface/Serializer.php:

if ( PEAR::isError($field) ) echo $field->getMessage();

See what the output is... trying to find out what the error is.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby perseqtor » Mon Oct 15, 2007 7:26 pm

I inserted that line and got a '2' just before the PEAR_Error error message.
perseqtor
 
Posts: 11
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Oct 15, 2007 11:37 pm

Okay... some more debugging then to see which field is causing the problem.
In the same place:
if ( PEAR::isError($field) ){
echo "Failed to serialize field $fieldname with value $value";
print_r($value);
}
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby perseqtor » Tue Oct 16, 2007 4:40 am

Steve -

FIXED thanks to that last error message. It was an uppercase/lowercase error in my conf.ini file under
the __auth section. The password field name had a lowercase typo, causing it to stall on locating the password field in the table
when I went to log in. Sorry about the stupid questions! The devil is in the details...
perseqtor
 
Posts: 11
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Oct 16, 2007 3:25 pm

Never a stupid question. If anything this highlights something that should be more easily debuggable.

Glad to hear it is working.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 13 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved