*

Hugo

  • ****
  • 186 posts
Fix error that pops up 100 x times a second
« on: December 15, 2022, 11:03:20 AM »
what does the following line in my debug log means?

PHP Deprecated:  substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /home/deb111392/domains/expeditionmeister.com/public_html/oc-includes/vendor/gettext/gettext/src/Utils/StringReader.php on line 31

It pops-up 100 times a second or more....

attached the file containing line 31

*

cartagena68

  • ***
  • 71 posts
Re: Fix error that pops up 100 x times a second
« Reply #1 on: December 15, 2022, 01:32:03 PM »
I think you are using PHP 8.1 and osclass version is not yet ready for that. If you use PHP 8.0 the error should go away

*

Hugo

  • ****
  • 186 posts
Re: Fix error that pops up 100 x times a second
« Reply #2 on: December 15, 2022, 01:43:11 PM »
Correct, we are using 8.1

However, if i change it to 8.0 my website doesn't load and gives me an empty webpage...

How to fix this?

*

cartagena68

  • ***
  • 71 posts
Re: Fix error that pops up 100 x times a second
« Reply #3 on: December 15, 2022, 02:01:32 PM »
That is very strange, is a fresh installation using default theme?

*

Hugo

  • ****
  • 186 posts
Re: Fix error that pops up 100 x times a second
« Reply #4 on: December 15, 2022, 02:13:04 PM »
I am using a child theme of the Delta Theme, but it is strange that 8.1 works and 8.0 not...

*

MB Themes

Re: Fix error that pops up 100 x times a second
« Reply #5 on: December 15, 2022, 02:30:55 PM »
@Hugo
Something is wrong most probably. I suppose if you enable error logs, both will be on same.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hugo

  • ****
  • 186 posts
Re: Fix error that pops up 100 x times a second
« Reply #6 on: December 15, 2022, 02:39:20 PM »
I am sorry, i don't understand what you mean..

Attached a screenshot of the errorlog

*

MB Themes

Re: Fix error that pops up 100 x times a second
« Reply #7 on: December 15, 2022, 02:49:31 PM »
@Hugo
Can you read it?
Enable error log.
https://docs.osclasspoint.com/debug-php-errors
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hugo

  • ****
  • 186 posts
Re: Fix error that pops up 100 x times a second
« Reply #8 on: December 15, 2022, 05:50:02 PM »
sorry, see the new screenshot

*

cartagena68

  • ***
  • 71 posts
Re: Fix error that pops up 100 x times a second
« Reply #9 on: December 15, 2022, 07:47:27 PM »

We know that this error is caused by PHP 8.1
I suggest you to delete the log file from server, change PHP to 8.0 and then access your website that show blank page. After that, check the new log file, so we can see what is the error using PHP 8.0

*

MB Themes

Re: Fix error that pops up 100 x times a second
« Reply #10 on: December 15, 2022, 07:52:09 PM »
This error is most probably related to PHP 8.1, before null in this function was just fine.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hugo

  • ****
  • 186 posts
Re: Fix error that pops up 100 x times a second
« Reply #11 on: December 23, 2022, 12:28:00 PM »
I debugged my website while I used PHP 8.0 as recommended; please check the following screenshot of the outcome


*

MB Themes

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hugo

  • ****
  • 186 posts
Re: Fix error that pops up 100 x times a second
« Reply #13 on: December 23, 2022, 09:03:20 PM »
Thank you!

Unfortunately; i am not that experienced yet... could you explain what i need to adjust?

Thanks!!!! <3

*

MB Themes

Re: Fix error that pops up 100 x times a second
« Reply #14 on: December 24, 2022, 08:12:39 AM »
Check if you have mysqli extension enabled in your php.
Discuss with hosting provider.
That function should not be missing.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots