Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Unsupported operand types


Go to End
Reply


10 Posts   15872 Views

Avatar
KumaZatheef

Community Member, 17 Posts

14 December 2007 at 9:44pm

Edited: 15/12/2007 6:43am

Hey all,

Just noticed that when I use Seamonkey on Mac and try to hit up my site, I get the following error:

Fatal error: Unsupported operand types in /absolute_path_to/sapphire/misc/Browscap.php on line 272

Taking a look deeper, I'm getting the following array for $value that that while loop uses:

Array
(
[0] => Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4
[1] => ^mozilla/5\.0 \(macintosh; .; .*mac os x.*; .*; rv\:1\.8.*\) gecko/.* seamonkey/1\.1.*$
[2] => Mozilla/5.0 (Macintosh; ?; *Mac OS X*; *; rv:1.8*) Gecko/* SeaMonkey/1.1*
[3] =>
[8] => MacOSX
)

Whereas in FF, the 3rd key has a value. Is this the Browscap issue that was fixed when it's mention here: [url]http://silverstripe.com/site-builders-forum/flat/9031[/url]??

EDIT: Sorry, this is not the issue, I was looking at the wrong RC.

I'm also curious, on line 267 of Browscap.php, I did a

print_r($this);

Wow, that is one huge amount printed out ... 32,573 lines?? And '_userAgents:private' has 3469 entries??
I obviously don't fully understand the purpose of it all. Out of 3469, my entry doesn't show up (seamonkey 1.1.4 on Mac) so it doesn't seem entirely efficient ... would it be easier to parse for key words? Like I said, doesn't make sense to me so I hope there's a good reason for the extreme verbosity.

Tips??

I'm really really liking what I see so far as I play around (obviously in FF since Seamonkey's buggered). Soon I'll be switching my entire site over to this because it all feels so easy ... another thing I am curious about though is how slow it feels in the admin side when it sometimes flashes to the SS - loading splash screen. Anyway, terrific work thus far, can't wait until the next stable release.

Oh, PS. Just noticed on the forum, I'm logged in and I still get this message:
"If this is your first visit, you will need to register before you can post. However, you can browse all messages below."

Um ... yeah, I'm logged in so I don't think I need to register ;)

Avatar
KumaZatheef

Community Member, 17 Posts

16 December 2007 at 8:56am

I should also mention that this is happening on silverstripe.com. I can not access SS.com from Mozilla on Mac due to this error. Doh!!

Avatar
Tim

Core Development Team, 201 Posts

16 December 2007 at 4:38pm

I've logged error Mac Mozilla error here for someone to look into..

http://open.silverstripe.com/ticket/2005#preview

Avatar
KumaZatheef

Community Member, 17 Posts

17 December 2007 at 10:30am

Any word / reason on the Browscap thing? Like: purpose?

Avatar
KumaZatheef

Community Member, 17 Posts

16 January 2008 at 6:53am

anyone? .... Bueller? .... anyone??

Purpose of Browscap?

Avatar
dio5

Community Member, 501 Posts

16 January 2008 at 7:24am

I'm guessing it's for sending different content to different browsers or for statistics purpose, but actually I would like to know too, certainly because it's such a huge file and I was always told that browser detection was a bad thing.

Avatar
jam13

121 Posts

16 January 2008 at 10:29pm

Typical - we launch a site on national breakfast radio, and the first person I point to the site is using Seamonkey on a Mac! What are the odds.

Does anyone have a fix for this, even if it's a workaround?

Avatar
KumaZatheef

Community Member, 17 Posts

23 January 2008 at 11:22am

*bump*

Surprisingly people are pretty silent on this one.
Browser detection in such a way is normally indicative of poor programming setup. Browser detection in general has a very specific place (ex: handheld devices vs. desktop computer). However, that being said, if it *must* be done, there are better alternatives. For example having a hash and segregating based on system and browser ... and possibly browser version ... (ex: IE6 is quite different than IE7).

But it still all boils down to what specific purpose is Browscap serving?!?

Go to Top