ThemeShaper Forums » Thematic


Chrome Regex

(2 posts)
  • Started 9 years ago by prikkprikkprikk
  • Latest reply from dannydamnboy
  • This topic is not resolved
  1. prikkprikkprikk

    I've recently switched from Firefox to Chrome, and got the following notice when using Thematic:

    Notice: Undefined offset: 1 in /Users/xxxxxx/Dropbox/sites/themedev/wp-content/themes/thematic/library/extensions/dynamic-classes.php on line 335

    That line sports the following regex:

    preg_match( "/Chrome\/(\d.\d)/si", $browser, $matches);

    Now that Chrome's version number is above 9, this needs to be updated. (And, frankly, it should have been like this from the start!)

    preg_match( "/Chrome\/(\d\d?.\d)/si", $browser, $matches);

    Given the rate of new Chrome versions, maybe it should be \d+ instead …!

    And maybe someone should looking into future-proofing the other regexes further down too. :-)

    Posted 9 years ago #
  2. same here!

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.