Bug #77338 [Opn->Fbk]: get_browser with empty string
Edit report at https://bugs.php.net/bug.php?id=77338&edit=1
ID: 77338
Updated by: requinix@php.net
Reported by: emondpph at gmail dot com
Summary: get_browser with empty string
-Status: Open
+Status: Feedback
Type: Bug
Package: Reproducible crash
Operating System: Mac OS Mojave
PHP Version: 7.3.0
Block user comment: N
Private report: N
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2018-12-22 23:02:57] emondpph at gmail dot com
Description:
------------
I noticed this bug while doing a batch of assertions on PHP 7.3.
get_browser('') will crash PHP.
In PHP 7.2 it would return an array.
Test script:
---------------
<?php
var_dump(get_browser(''));
?>
Expected result:
----------------
object(stdClass)#1 (10) { ["browser_name_regex"]=> string(6) "~^.*$~"
["browser_name_pattern"]=> string(1) "*" ["parent"]=> string(17)
"DefaultProperties" ["comment"]=> string(15) "Default Browser"
["browser"]=> string(15) "Default Browser" ["ismobiledevice"]=>
string(0) "" ["istablet"]=> string(0) "" ["version"]=>
string(3) "0.0" ["platform"]=> string(7) "unknown"
["device_type"]=> string(7) "unknown" }
Actual result:
--------------
Crash
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77338&edit=1
Thread (10 messages)