Testing Sanity

The core task of software development is sanity testing.

  • warning: Creating default object from empty value in /home2/thepalls/public_html/cgpsoftware/modules/taxonomy/taxonomy.pages.inc on line 34.
  • warning: Parameter 2 to gmap_gmap() expected to be a reference, value given in /home2/thepalls/public_html/cgpsoftware/includes/module.inc on line 483.
  • strict warning: Non-static method view::load() should not be called statically in /home2/thepalls/public_html/cgpsoftware/sites/all/modules/views/views.module on line 879.



05 Nov 2009
Posted by cgp

Ok, so the moral of the story here is this: Don’t determine what version a browser is based on the methods available. I don’t think I was clear about this in the past because I’ve never implemented it myself. What you’re supposed to do is detect whether or not the native functionality exists, if it does, then use it. If not, then either recreate it the functionality or raise an exception (unsupported).

I always thought testing the capability of the browser (instead of using browser version strings) meant conditions like this all over the place before you used the function: