Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0

Request #12877 Request for emulator support.
Submitted: 2008-01-11 05:18 UTC
From: kawai Assigned: kuboa
Status: Closed Package: Net_UserAgent_Mobile (version 0.30.0)
PHP Version: 5.2.5 OS: Windows Vista
Roadmaps: 0.31.0    
Subscription  


 [2008-01-11 05:18 UTC] kawai (Hiroaki Kawai)
Description: ------------ The emulator that Softbank (and Vodafone, Motrola) provides does not work with the current version of Net_UserAgent_Mobile because of its strange User-Agent. I'd like to submit a patch. ;-) Test script: --------------- <?php header("Content-type: text/plain"); require_once('Net/UserAgent/Mobile.php'); $a=Net_UserAgent_Mobile::factory('Semulator/1.0/813T/TJ001/SN123456789012345 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1'); var_dump($a); Expected result: ---------------- object(Net_UserAgent_Mobile_Vodafone)#2 (19) { ["_model"]=> string(4) "813T" ["_packetCompliant"]=> bool(true) ["_serialNumber"]=> string(15) "123456789012345" ["_vendor"]=> string(1) "T" ["_vendorVersion"]=> string(4) "J001" ["_javaInfo"]=> array(2) { ["Profile"]=> string(8) "MIDP-2.0" ["Configuration"]=> string(8) "CLDC-1.1" } ["_is3G"]=> bool(true) ["_msname"]=> NULL ["name"]=> string(9) "Semulator" ["version"]=> string(3) "1.0" ["_display"]=> NULL ["_request"]=> object(Net_UserAgent_Mobile_Request_Env)#1 (1) { ["_env"]=> array(1) { ["HTTP_USER_AGENT"]=> string(103) "Semulator/1.0/813T/TJ001/SN123456789012345 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1" } } ["_error"]=> 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) { } } Actual result: -------------- object(Net_UserAgent_Mobile_NonMobile)#2 (11) { ["name"]=> string(9) "Semulator" ["version"]=> string(3) "1.0" ["_display"]=> NULL ["_request"]=> object(Net_UserAgent_Mobile_Request_Env)#1 (1) { ["_env"]=> array(1) { ["HTTP_USER_AGENT"]=> string(103) "Semulator/1.0/813T/TJ001/SN123456789012345 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1" } } ["_error"]=> 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) { } }

Comments

 [2008-02-09 17:57 UTC] kuboa (KUBO Atsuhiro)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.