pocketarc / codeigniter

Fork of CI3 kept up to date with PHP 8.3 (and beyond; will be maintained indefinitely).
MIT License
71 stars 15 forks source link

Fix library email PHP 8.x compatibilty #7

Closed ludobesse closed 6 months ago

ludobesse commented 6 months ago

Line 427: $this->charset = strtoupper((string) $this->charset);

poodle123 commented 6 months ago

Can you share the problem? Or do you just refer to the missing check - if (isset($this->charset)) { ... } ? My understanding is that its set prior under line 151: public $charset = 'utf-8';

I am running this on PHP 8.3.4 with extensive usage of the email library and dont see any error in my logs or any issue with sending emails.

I am using the default 'mail' protocoll without any specific configuration as well as smtp through SSL for newsletters (sending >10000 within an hour) and I see no problems with sendng email. What settings do you use?

ludobesse commented 6 months ago

I get this error message when loading the library (autoload)

strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated /XXXXXX/vendor/pocketarc/codeigniter/system/libraries/Email.php Line 427

poodle123 commented 6 months ago

this might be a problem on your side. charset is defined in line 15 and not overwritten so I dont see how it could be null.

ludobesse commented 6 months ago

Sorry, the problem was on my part. I had an old config file that hadn't been deleted.