PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_UserAgent_Mobile » Bug #9123

SoftBank 705P can't be parsed

Details

Submitted2006-10-21 17:49 UTC
Fromkojima at gree dot co dot jp
Assignedkuboa
StatusClosed
PackageNet_UserAgent_Mobile
PHP Version4.3.11
OSLinux
Roadmaps(Not assigned)

Comments

[2006-10-21 17:49 UTC] kojima at gree dot co dot jp

Description:
------------
SoftBank 705P - http://mb.softbank.jp/mb/product/3G/705p/

UserAgent
---------
SoftBank/1.0/705P/PJP10 Browser/Teleca-Browser/3.1 Profile/MIDP-2.0 Configuration/CLDC-1.1

Vodafone.php
------------
454c454
< if (!preg_match('!^([a-z]+)([a-z]\d{3})$!i', $modelVersion, $matches)
---
> if (!preg_match('!^([a-z]+)([a-z]\d{2,3})$!i', $modelVersion, $matches)

Test script:
---------------
$ua =& Net_UserAgent_Mobile::factory('SoftBank/1.0/705P/PJP10 Browser/Teleca-Browser/3.1 Profile/MIDP-2.0 Configuration/CLDC-1.1');
var_dump($ua);

Expected result:
----------------
object(net_useragent_mobile_vodafone)(19) {
["_model"]=>
string(4) "705P"
["_packetCompliant"]=>
bool(true)
["_serialNumber"]=>
NULL
["_vendor"]=>
string(2) "PJ"
["_vendorVersion"]=>
string(3) "P10"
["_javaInfo"]=>
array(2) {
["Profile"]=>
string(8) "MIDP-2.0"
["Configuration"]=>
string(8) "CLDC-1.1"
}
["_is3G"]=>
bool(true)
["_msname"]=>
NULL
["_debug"]=>
bool(false)
["_default_error_mode"]=>
NULL
["_default_error_options"]=>
NULL
["_default_error_handler"]=>
string(0) ""
["_error_class"]=>
string(26) "Net_UserAgent_Mobile_Error"
["_expected_errors"]=>
array(0) {
}
["name"]=>
string(8) "SoftBank"
["version"]=>
string(3) "1.0"
["_display"]=>
NULL
["_request"]=>
&object(net_useragent_mobile_request_env)(1) {
["_env"]=>
array(1) {
["HTTP_USER_AGENT"]=>
string(90) "SoftBank/1.0/705P/PJP10 Browser/Teleca-Browser/3.1 Profile/MIDP-2.0 Configuration/CLDC-1.1"
}
}
["_error"]=>
NULL
}

[2006-11-08 02:21 UTC] kuboa at php dot net

Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/get/Net_UserAgent_Mobile