Unsupported Operand Types
| From: | Brian T. Allen | Date: | Sat, 18 Jan 2003 10:27:44 +0000 |
| Subject: | Unsupported Operand Types | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-93547@lists.php.net to get a copy of this message | ||
Hi,
I've just spent the night upgrading my RedHat 6.2 server to:
Apache 1.3.27
PHP 4.3.0
MySQL 3.23.54a
Mod_SSL 2.8.12
OpenSSL 0.9.7
ZendOptimizer 2.1.0
Now I'm getting (inconsistently):
PHP Fatal error: Unsupported operand types in
/web/domain/html/includes/item.inc on line 35
That line contains:
$variable1 = $variable2 - 1;
Both variables may be unassigned prior to this line, or may have numeric
values.
In a related piece of weirdness, I have this included at the bottom of
every file:
<?php
if(mysql_error()) {
$MYSQL_ERROR = mysql_error();
$MYSQL_ERROR_NO = mysql_errno();
$date = (date("l F d, Y g:i A"));
mail("brian@domain.com", "Database Error", "
Errors:
$MYSQL_ERROR_NO:$MYSQL_ERROR
Query:
$query_log
Page: $PHP_SELF
Date: $date
","From: Webmaster <webmaster@domain.com>");
?>
Which normally returns something like:
-------------
Errors:
1062:Duplicate entry 'email@domain.com' for key 1
Query:
Page: /account/new.html
Date: Friday January 17, 2003 12:42 PM
But now it returns:
----------------
Errors:
Saturday January 18, 2003 3:18 AM:Saturday January 18, 2003 3:18
AM
Query:
Array
Page: /community/newsletter.html
Date: Array
-------------
How can $date be an array, when it gets assigned right above where it
gets called?
What am I missing in this new version of PHP that is making my scripts
seemingly incompatible?
Thanks,
Brian Allen