User tests: Successful: Unsuccessful:
Pull Request for Issue #16970 .
Fix regression for Issue #15228 .
Revert to previous individual preg_match rather than combine them into 1.
Check your PHP error log.
or
Create the following PHP script and run it. 1st preg_match( (previous) outputs no error. 2nd preg_match( (current) outputs error.
<?php
$agent = "Mozilla/5.0 (iPad; CPU OS 10_3_2 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) CriOS/59.0.3071.102 Mobile/14F89 Safari/602.1";
echo 'v3.6.5 ';
preg_match('|CriOS[/ ]([0-9.]+)|', $agent, $version);
var_dump($version);
list ($majorVersion, $minorVersion) = explode('.', $version[1]);
echo 'v3.7.3 ';
preg_match('/Chrome[\/ ]([0-9.]+)|CrMo[\/ ]([0-9.]+)|CriOS[\/ ]([0-9.]+)/i', $agent, $version);
var_dump($version);
list ($majorVersion, $minorVersion) = explode('.', $version[1]);
?>
results (1st array is v3.6.5 and 2nd array is v3.7.3):
v3.6.5 array(2) {
[0]=>
string(19) "CriOS/59.0.3071.102"
[1]=>
string(13) "59.0.3071.102"
}
v3.7.3 array(4) {
[0]=>
string(19) "CriOS/59.0.3071.102"
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(13) "59.0.3071.102"
}
<br />
<b>Notice</b>: Undefined offset: 1 in <b>C:\xampp\htdocs\agent.php</b> on line <b>14</b><br />
No PHP Notice
PHP message: PHP Notice: Undefined offset: 1 in /libraries/joomla/environment/browser.php on line 282\n
None
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
Title |
|
@photodude I don't know how to do it. Would you mind doing it? Thanks.
Hello
I tried to change browser.php with the changes about Chrome today like shown in "Files changed", and the error went away from Chrome browser (ver. 60.x) on Ipad (Ios 10.3.2). I am on Joomla 3.7.4.
I have not tested regarding to IE. I am on Win7, IE 11, and don't see any issues with "default" code.
Hope it will be fixed in Joomla.
Thanks @Brian5600.
@Brian5600 Please mark it a successful test here: https://issues.joomla.org/tracker/joomla-cms/17139
@Quy i altered successfully Test for @Brian5600
@franz-wohlkoenig @Quy thanks.
I also tested with success in Chrome installed on Win8 today.
@photodude who is second successfully Test?
@franz-wohlkoenig I guess I miss read it, I thought you had done a test.
Really this is a "by code review" item as there is no good/easy way to test this and there are not really any unit tests for it either.
I'll mark approved by code review.
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
@photodude i altered your Review as successfully Test at Issue Tracker.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-12 16:28:34 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
@rdeutz I have two v3.7.3 installs where the second install has this PR. The first install is littered with
Fix undefined offset: 1
daily in the PHP error log file and not in the second install. This is a regression from v.3.7.2.