[PHP] unsupported operand types

2004-01-19 Thread Diana Castillo
why do I get this error?
Fatal error: Unsupported operand types in c:\program files\apache
group\apache\htdocs\web\usr\local\global\php\providers\interfaces\TouricoTes
tInterface.php on line 827
the code is as follows:
$price=0;
foreach ($price_data as $price) {
$room_price=$price-getAttribute(value);
$price=$price+$room_price;
--
--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
  http://www.destinia.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] unsupported operand types

2004-01-19 Thread Burhan Khalid
Diana Castillo wrote:
why do I get this error?
Fatal error: Unsupported operand types in c:\program files\apache
group\apache\htdocs\web\usr\local\global\php\providers\interfaces\TouricoTes
tInterface.php on line 827
the code is as follows:
$price=0;
Here $price is an integer.

foreach ($price_data as $price) {
$room_price=$price-getAttribute(value);
You can only use - with an object, not an integer

$price=$price+$room_price;
--
--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
  http://www.destinia.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Unsupported operand types

2003-01-18 Thread Brian T. Allen
Hi,

I've just spent the night upgrading my RedHat 6.2 server to:

Apache1.3.27
PHP4.3.0
MySQL3.23.54a
Mod_SSL2.8.12
OpenSSL0.9.7
ZendOptimizer2.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, Yg:i A));

mail([EMAIL PROTECTED], Database Error, 

Errors:
$MYSQL_ERROR_NO:$MYSQL_ERROR

Query:
$query_log

Page:   $PHP_SELF 
Date:   $date

,From: Webmaster [EMAIL PROTECTED]);
?

Which normally returns something like:

-
Errors:
1062:Duplicate entry '[EMAIL PROTECTED]' for key 1

Query:


Page:   /account/new.html 
Date:   Friday January 17, 200312:42 PM

But now it returns:

Errors:
Saturday January 18, 20033:18 AM:Saturday January 18, 20033:18
AM

Query:
Array

Page:   /community/newsletter.html/2001-03-01 
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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php