Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed "passing null to parameter" in Mage_Core_Helper_String #3341

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

kiatng
Copy link
Contributor

@kiatng kiatng commented Jun 21, 2023

Description (*)

I used https://onlinephp.io/ for testing. As an example:

$haystack = null;
$needle = null;
$offset = null;
$result = iconv_strpos($haystack, $needle, $offset, 'UTF-8');
var_dump($result);

produces

Deprecated: iconv_strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/user/scripts/code.php on line 5

Deprecated: iconv_strpos(): Passing null to parameter #2 ($needle) of type string is deprecated in /home/user/scripts/code.php on line 5

Deprecated: iconv_strpos(): Passing null to parameter #3 ($offset) of type int is deprecated in /home/user/scripts/code.php on line 5
bool(false)

Related Pull Requests

PR #3329

@github-actions github-actions bot added the Component: Core Relates to Mage_Core label Jun 21, 2023
@fballiano fballiano merged commit 9b8eded into OpenMage:main Jun 21, 2023
15 checks passed
@kiatng kiatng deleted the passing_null_helper_string branch June 22, 2023 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Relates to Mage_Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants