joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.7k stars 3.63k forks source link

Issue Deprecated: stripos() in WebClient.php for ever? #42317

Closed Chessy65 closed 8 months ago

Chessy65 commented 8 months ago

Steps to reproduce the issue

If you access from a joomla system to another joomla on which is Joomla 4.4 and PHP8.1 or higher an dthe WebClient.php is needed, then you receive 9 !! error lines with following text:

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in ../libraries/vendor/joomla/application/src/Web/WebClient.php

This issue is for a long time and should be solved, but it is missing in the actual fork. Why?

You need insert only '(string)'

Expected result

see picture

Actual result

System information (as much as possible)

Additional comments

I have found it already im #39960screen shot 2023-11-07 at 17 57 48

alikon commented 8 months ago

please test https://github.com/joomla-framework/application/pull/121

samlatif commented 6 months ago

I have the sam error, PHP Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /libraries/vendor/joomla/application/src/Web/WebClient.php on line 286.

joomla4.4 PHP 8.2.14 template Cassiopeia. Any suggestions to solve it?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42317.

dustbin34 commented 5 months ago

Hello I have this issue. Only at the root of my website : if I enter http://mywebsite.com I have the deprecated issue, if I enter http://mywebsite.com/index.php that's ok. I use Cassiopea, how could I solved this trouble?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42317.

dustbin34 commented 5 months ago

Sorry problem solved! I connected to the Joomla aministration and after a cache clearing the issue Deprecated: stripos(...) on my home page has disappeared. Bye!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42317.

richard67 commented 4 months ago

Please test #42937 . Thanks in advance.

richard67 commented 4 months ago

For 5.x this issue has been fixed with PR #42945 , which will be part of the 5.1.0-beta1 coming up tomorrow.

For 4.4 it still needs to be fixed.

M-Falken commented 1 month ago

Hi, still present under 5.1.1 PHP Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /libraries/vendor/joomla/application/src/Web/WebClient.php on line 380 PHP Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /libraries/vendor/joomla/application/src/Web/WebClient.php on line 472 PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /libraries/vendor/joomla/application/src/Web/WebClient.php on line 502 PHP Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /libraries/vendor/joomla/application/src/Web/WebClient.php on line 505 PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /libraries/vendor/joomla/application/src/Web/WebClient.php on line 545