False/true not converted to 0/1 during browscap.ini import

Created on 17 December 2012, about 12 years ago
Updated 26 November 2024, 26 days ago

The false/true strings are no longer converted to 0/1 with PHP 5.3, in _browscap_import(). Instead they are imported as the literal strings 'false' or 'true' so that they always evaluate to true when cast to booleans.

Maybe the source file format has changed from Win to Unix with the change of the remote repository URL?

To test, put this in an _init function:

  $browser = browscap_get_browser();
  dsm($browser);
  if ($browser['ismobiledevice']) {
    dsm($browser['ismobiledevice'], "$browser['ismobiledevice'] evaluates to true");
  }

And then refresh the data using the steps described below.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇹Italy mondrake 🇮🇹

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024