Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Unsupported operand types

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

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

Page: 1 2
Go to End
Author Topic: 15741 Views
  • KumaZatheef
    Avatar
    Community Member
    17 Posts

    Unsupported operand types Link to this post

    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: http://silverstripe.com/site-builders-forum/flat/9031??

    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 ;)

  • KumaZatheef
    Avatar
    Community Member
    17 Posts

    Re: Unsupported operand types Link to this post

    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!!

  • Tim
    Avatar
    Core Development Team
    201 Posts

    Re: Unsupported operand types Link to this post

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

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

  • KumaZatheef
    Avatar
    Community Member
    17 Posts

    Re: Unsupported operand types Link to this post

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

  • KumaZatheef
    Avatar
    Community Member
    17 Posts

    Re: Unsupported operand types Link to this post

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

    Purpose of Browscap?

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: Unsupported operand types Link to this post

    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.

  • jam13
    Avatar
    121 Posts

    Re: Unsupported operand types Link to this post

    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?

  • KumaZatheef
    Avatar
    Community Member
    17 Posts

    Re: Unsupported operand types Link to this post

    *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?!?

    15741 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.