Page 1 of 1

Deprecated: nl2br()

Posted: Thu Jul 10, 2025 6:45 am
by BatteryTrader
Morning
I Have 1.1.0.3 running on PHP8.3, have an issue with Deprecated: nl2br() error, which I cannot work out yet

I think this is pulling data for info pages, and its probably blank and that's why its giving the warning (although might be completely wrong)

Code: Select all

[Thu Jul 10 07:30:02.156255 2025] [proxy_fcgi:error] [pid 1028240:tid 1028351] [client 80.190.80.176:0] AH01071: Got error 'PHP message: PHP Warning:  Undefined array key 0 in /home/SERVER/domains/DOMAIN.com/public_html/includes/system/versioned/1.0.7.6/info_pages.php on line 57; PHP message: PHP Warning:  Trying to access array offset on null in /home/SERVER/domains/DOMAIN.com/public_html/includes/classes/keys.php on line 97; PHP message: PHP Warning:  Trying to access array offset on null in /home/SERVER/domains/DOMAIN.com/public_html/includes/classes/keys.php on line 98; PHP message: PHP Deprecated:  nl2br(): Passing null to parameter #1 ($string) of type string is deprecated in /home/batterycom/domains/batterytrader.com/public_html/includes/classes/keys.php on line 98'
The info_pages.php line 57 refers to

Code: Select all

      // will always be the first and only item in the returned array
      return $page_arr[0];
    }
and keys.php 97-98

Code: Select all

    $email_title = $key_email['pages_title'];
      $email_text = nl2br($key_email['pages_text']);
Any general pointers of where to look would be great.

David

Re: Deprecated: nl2br()

Posted: Thu Jul 10, 2025 8:51 am
by burt
>> I think this is pulling data for info pages

The other way around...it's not pulling data.

The error means that no page is being returned by the page call.
So nothing is being passed to nl2br.

Do you have a page set up with the correct Slug ?

Re: Deprecated: nl2br()

Posted: Thu Jul 10, 2025 12:09 pm
by BatteryTrader
Ok thankyou, I was in the right area.

Turns out it was the Key slug from the S06e08-1.1.0.0

Put it in, and that particular warning seems to have gone now.

Cheers

David