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

Null deprecation in mail #3706

Open
kiatng opened this issue Dec 21, 2023 · 4 comments
Open

Null deprecation in mail #3706

kiatng opened this issue Dec 21, 2023 · 4 comments
Labels
bug PHP 8 Related to PHP8

Comments

@kiatng
Copy link
Contributor

kiatng commented Dec 21, 2023

I have this error in the log:

    [type] => 8192:E_DEPRECATED
    [message] => strtr(): Passing null to parameter #1 ($string) of type string is deprecated
    [file] => .../vendor/shardj/zf1-future/library/Zend/Mail.php
    [line] => 1223

Probably from

public function sendEmail($notifyCustomer = true, $comment = '')

Preconditions (*)

  1. PHP8

Steps to reproduce (*)

  1. Not sure how

Expected result (*)

  1. [Screenshots, logs or description]

Actual result (*)

  1. [Screenshots, logs or description]
@kiatng kiatng added bug PHP 8 Related to PHP8 labels Dec 21, 2023
@fballiano
Copy link
Contributor

did it happen again? do you have more info like a backtrace?

@sreichel
Copy link
Contributor

sreichel commented Sep 4, 2024

https://github.com/OpenMage/magento-lts/actions/runs/10707689462/job/29688504497

Found sameerror during unit tests. At the moment there is only one method covered that send mails ... seems it comes from sendPasswordResetConfirmationEmail()

@kiatng
Copy link
Contributor Author

kiatng commented Sep 5, 2024

Copy paste for easy ref:

Run php -f vendor/bin/phpunit
PHPUnit [9](https://github.com/OpenMage/magento-lts/actions/runs/10707689462/job/29688504497#step:12:10).6.19 by Sebastian Bergmann and contributors.

PHP Deprecated:  strtr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/runner/work/magento-lts/magento-lts/vendor/shardj/zf1-future/library/Zend/Mail.php on line 1223
sh: 1: /usr/sbin/sendmail: not found
...............................................................  63 / 144 ( 43%)
............................................................... 126 / 144 ( 87%)
PHP Deprecated:  str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/runner/work/magento-lts/magento-lts/lib/Varien/Object.php on line 594
..................                                              144 / 144 ([10](https://github.com/OpenMage/magento-lts/actions/runs/10707689462/job/29688504497#step:12:11)0%)

Time: 00:01.529, Memory: 46.00 MB

OK (144 tests, 223 assertions)

Generating code coverage report in Clover XML format ... done [00:30.181]

Generating code coverage report in Crap4J XML format ... done [00:00.549]

@sreichel
Copy link
Contributor

sreichel commented Sep 8, 2024

It's not the same ... your report was about 1st parameter, phpunits about 2nd ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug PHP 8 Related to PHP8
Projects
None yet
Development

No branches or pull requests

3 participants