Re: [PHP] php err msg/issue...
I gather $rec is empty.. :) make sure there is something in it before you assign it to that object member. Jason [EMAIL PROTECTED] wrote: hi... i'm dealing with an app that's throwing an err/warning msg.. i'm using php5, on a linux rh8.0 system. i believe the code was written for php4. the code is: if($rec) { $rs-append($setDefaults); $rs-rows[$rs-pos]-fields=$rec; generates err msg... $rs-rows[$rs-pos]-id=-1; } $rec = Array ( [0] = 0 [1] = admin [2] = 21232f297a57a5a743894a0e4a801fc3 [3] = [4] = TRUE ) the err msg being generated is: Php-Txt-Db-Access Error: PHP Error: [2048] Creating default object from empty value [Line: 1537] [File: /var/www/html/blast/txtdbapi/resultset.php] i'm not sure why this is generated, or what's going on, or even how/why to correct it!! apparently this doesn't happen with php4, but i'm not certain. any thoughts/opinions/comments would be helpful... thanks -bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php err msg/issue...
$rec is not empty jason... 1st, if $rec was empty.. the 'if' section would not be called, and the err would not be thrown 2nd.. i printed the value of '$rec' below the 'if' block of code... but.. umm thanks... -Original Message- From: Jason Davidson [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 9:51 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] php err msg/issue... I gather $rec is empty.. :) make sure there is something in it before you assign it to that object member. Jason [EMAIL PROTECTED] wrote: hi... i'm dealing with an app that's throwing an err/warning msg.. i'm using php5, on a linux rh8.0 system. i believe the code was written for php4. the code is: if($rec) { $rs-append($setDefaults); $rs-rows[$rs-pos]-fields=$rec; generates err msg... $rs-rows[$rs-pos]-id=-1; } $rec = Array ( [0] = 0 [1] = admin [2] = 21232f297a57a5a743894a0e4a801fc3 [3] = [4] = TRUE ) the err msg being generated is: Php-Txt-Db-Access Error: PHP Error: [2048] Creating default object from empty value [Line: 1537] [File: /var/www/html/blast/txtdbapi/resultset.php] i'm not sure why this is generated, or what's going on, or even how/why to correct it!! apparently this doesn't happen with php4, but i'm not certain. any thoughts/opinions/comments would be helpful... thanks -bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php err msg/issue...
* Thus wrote bruce: hi... i'm dealing with an app that's throwing an err/warning msg.. i'm using php5, on a linux rh8.0 system. i believe the code was written for php4. the code is: if($rec) { $rs-append($setDefaults); $rs-rows[$rs-pos]-fields=$rec; generates err msg... ... the err msg being generated is: Php-Txt-Db-Access Error: PHP Error: [2048] Creating default object from empty value [Line: 1537] [File: /var/www/html/blast/txtdbapi/resultset.php] This is because the element in $rs-rows[$rs-pos] is not defined so php made a stdClass before it can assign the -fields member. Curt -- Quoth the Raven, Nevermore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php err msg/issue...
hi... i'm dealing with an app that's throwing an err/warning msg.. i'm using php5, on a linux rh8.0 system. i believe the code was written for php4. the code is: if($rec) { $rs-append($setDefaults); $rs-rows[$rs-pos]-fields=$rec; generates err msg... $rs-rows[$rs-pos]-id=-1; } $rec = Array ( [0] = 0 [1] = admin [2] = 21232f297a57a5a743894a0e4a801fc3 [3] = [4] = TRUE ) the err msg being generated is: Php-Txt-Db-Access Error: PHP Error: [2048] Creating default object from empty value [Line: 1537] [File: /var/www/html/blast/txtdbapi/resultset.php] i'm not sure why this is generated, or what's going on, or even how/why to correct it!! apparently this doesn't happen with php4, but i'm not certain. any thoughts/opinions/comments would be helpful... thanks -bruce Without seeing your classes, PHP4 classes will not work with PHP5. The OO model has been completely revamped. So if the code works in PHP4 but not in PHP5, my guess is that you either need to downgrade to PHP4 or re-code your classes to fit the PHP5 OO model. -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php err msg/issue...
curt... when i print $rs, i get the following: displaying $rs shows that $rs is: ResultSet Object ( [colNames] = Array ( [0] = id [1] = username [2] = password [3] = email [4] = is_super ) [colAliases] = Array ( ) [colTables] = Array ( ) [colTableAliases] = Array ( ) [colTypes] = Array ( [0] = inc [1] = str [2] = str [3] = str [4] = str ) [colDefaultValues] = Array ( [0] = 0 [1] = noname [2] = d41d8cd98f00b204e9800998ecf8427e [3] = [EMAIL PROTECTED] [4] = FALSE ) [colFuncs] = Array ( ) [colFuncsExecuted] = Array ( ) [rows] = Array ( ) [pos] = 0 [orderColNrs] = Array ( ) [orderTypes] = Array ( ) ) when i print $rs-pos, i get '0' so are you saying that the code can't handle '$rs-rows[0] = $rec' if this is the case, how can this be corrected i guess it boils down to, how do you create/initialize/add a row to the db structure..??? thanks... -bruce ps.. i tried to print $rs-rows[0], and got an 'Undefined offset: 0' err msg so this would seem to support what you're saying... so how can i correct/modify this! -Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 10:07 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] php err msg/issue... * Thus wrote bruce: hi... i'm dealing with an app that's throwing an err/warning msg.. i'm using php5, on a linux rh8.0 system. i believe the code was written for php4. the code is: if($rec) { $rs-append($setDefaults); $rs-rows[$rs-pos]-fields=$rec; generates err msg... ... the err msg being generated is: Php-Txt-Db-Access Error: PHP Error: [2048] Creating default object from empty value [Line: 1537] [File: /var/www/html/blast/txtdbapi/resultset.php] This is because the element in $rs-rows[$rs-pos] is not defined so php made a stdClass before it can assign the -fields member. Curt -- Quoth the Raven, Nevermore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php err msg/issue...
* Thus wrote bruce: curt... when i print $rs, i get the following: displaying $rs shows that $rs is: ResultSet Object ( [rows] = Array ( ) [pos] = 0 ... when i print $rs-pos, i get '0' so are you saying that the code can't handle '$rs-rows[0] = $rec' Thats different than what you originally had: $rs-rows[0]-fields = $rec php is being friendly and creating an object before assigning the variable (to a non-existing array element). The error you are getting is because you have E_STRICT included in your error_reporting level. ;E_STRICT - run-time notices, enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code if this is the case, how can this be corrected $rs-rows[0] = new stdClass(); $rs-rows[0]-fields = $rec; Curt. -- Quoth the Raven, Nevermore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php