Project

General

Profile

Actions

Bug #23074

closed

PHP Warning in class.t3lib_matchcondition_abstract.php if bowser is unknown

Added by Mark Iron over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-07-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Preface:
In this issue several problems were reported, which are now dealt with as seperated issues.
This issue only is to deal with the problem in class.t3lib_matchcondition_abstract.php.

===

When an unkown user agent is requesting a page, the browser detection code fails.

PHP Warning: Invalid argument supplied for foreach() in t3lib/matchcondition/class.t3lib_matchcondition_abstract.php line 222

(issue imported from #M14970)


Files

Core_PHP_Warnings.log_eval (3.15 KB) Core_PHP_Warnings.log_eval Administrator Admin, 2010-07-02 12:58
core_php_err (6.76 KB) core_php_err Administrator Admin, 2010-07-02 17:56
bug_14970.diff (697 Bytes) bug_14970.diff Administrator Admin, 2010-07-05 20:00
bug_14970_v2.diff (685 Bytes) bug_14970_v2.diff Administrator Admin, 2010-07-07 10:12

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #22974: Unknown browsers result in error conditionClosedBenni Mack2010-06-23

Actions
Actions #1

Updated by Mark Iron over 14 years ago

I would like change the severity from minor to major but don't know how to do it "after" the issue has been inserted.

The content of the attached file is a part of a log file without the date/time in the front of each line (check the creating commands)

Actions #2

Updated by Steffen Gebert over 14 years ago

Please report these problems to the extension's authors. In my eyes, this is no core issue (if you think so, please reopen this issue!).

Thanks!

Actions #3

Updated by Mark Iron over 14 years ago

I have splittet it in two extensions issues:

http://bugs.typo3.org/view.php?id=14976
new issue for sr_feuser_register: Core: Error handler (FE): PHP Warning: explode() expects parameter 2 to be string

and another one for mail_direct:
http://bugs.typo3.org/view.php?id=14973
Missing category checkboxes on the recipient list page [BE] after installing direct_mail extension

However I guess that at least one of the following two errors is core specific:
t3lib/matchcondition/class.t3lib_matchcondition_abstract.php line 222
typo3/sysext/cms/tslib/class.tslib_content.php line 6687

Thank you for your help :)

Actions #4

Updated by Caspar Stuebs over 14 years ago

The error in class.t3lib_matchcondition_abstract.php is core-related.

The function t3lib_utility_client::getBrowserInfo() was written new for 4.4. Within the return-array there is a new key called 'all', should containing an array, which is now used for the condition-testing in t3lib_matchcondition_abstract->evaluateConditionCommon().
But if the browser is 'unknown' neither the new key 'all', nor the key 'version' are (empty) initialized for the return array.
Due to this, the browser-check produces the given warning while trying to match a ts [browser = ...] condition.

I have added both keys with empty string/array ...
see patch

Actions #5

Updated by Caspar Stuebs over 14 years ago

I am not able to reproduce the error from class.tslib_content.php line 6687

Actions #6

Updated by Chris topher over 14 years ago

I modified the report accordingly after the different issues were split up.

Actions #7

Updated by Mark Iron over 14 years ago

Thank you very much. I have inserted the changes and didn't get the error message any more (t3lib/matchcondition/class.t3lib_matchcondition_abstract.php line 222) however I will test it more carefully and leave a notice if it appears again in the logfile.

Actions #8

Updated by Steffen Gebert over 14 years ago

It looks like the error in tslib_content is also caused by sr_feuserregister:

Core: Error handler (FE): PHP Warning: Parameter 2 to tx_sremailsubscribe_pi1::main() expected to be a reference, value given in typo3_src-4.4/typo3/sysext/cms/tslib/class.tslib_content.php line 6687

So I would stick to the matchcondition issue here. Caspar, can you send this to the core list, please?

Actions #9

Updated by Caspar Stuebs over 14 years ago

added new patch, where array key 'version' is empty and not set to 'unknown'

Actions #10

Updated by Caspar Stuebs over 14 years ago

If the error in tslib_content is caused by sr_email_subscribe, there has to be a new BT entry for this, or??

Actions #11

Updated by Steffen Gebert over 14 years ago

Yes, please report

Actions #13

Updated by Steffen Kamper over 14 years ago

Committed to 4_4 rev 8159 and trunk rev 8160

Actions

Also available in: Atom PDF