| | |
get_browser().....error
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2008
Posts: 35
Reputation:
Solved Threads: 0
hi, i'm trying to edit something on a site i didn't code myself so i downloaded the files and set them up on a virtual host on my local machine. i am using wamp server with php v 5.2.9-2. the problem is when i go the page on my local machine i get this error:
Notice: Trying to get property of non-object in C:\wamp\www\yikers\common\browser.php on line 18
here is the code:
does anyone know what the problem could be?
Notice: Trying to get property of non-object in C:\wamp\www\yikers\common\browser.php on line 18
here is the code:
PHP Syntax (Toggle Plain Text)
public function isIE() { $b = get_browser(); if ($b->parent == 'IE 6.0' || $b->parent == 'IE 5.5' || $b->parent == 'IE 5.01') //this is line 18 return true; else return false; }
does anyone know what the problem could be?
The problem is that get_browser returns an array, not an object. use
$b['parent'] , not $b->parent GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Try the following:
php Syntax (Toggle Plain Text)
public function isIE() { $b = get_browser(null, true); if ($b['browser']=='IE') return true; else return false; }
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
My favourite PC. - Oopy Doopy Do 2U2!
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - Oopy Doopy Do 2U2!
![]() |
Similar Threads
- urllib2.URLError: <urlopen error unknown url type: 'http> using twill on gmail.com (Python)
- Error Loading operating System (Windows NT / 2000 / XP)
- svchost.exe error (Windows NT / 2000 / XP)
- New Hardware Causing Error (Windows NT / 2000 / XP)
- office 2000 install error (Windows NT / 2000 / XP)
- VMWare Unrecoverable Error (*nix Software)
- Error in Wrox Book (Perl)
Other Threads in the PHP Forum
- Previous Thread: building table with php
- Next Thread: PHP Parse error: syntax error, unexpected T_VARIABLE
Views: 290 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email encode error file files folder form forms function functions google howtowriteathesis href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple multipletables mysql oop parse paypal pdf php problem provider query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table template tutorial update updates upload url validation validator variable video web xml youtube






