Notifications
Clear all

Suggestion I get an error when trying to access array offset with null in

16 Posts
3 Users
1 Reactions
1,080 Views
Posts: 19
Topic starter
(@zygzak)
Eminent Member
Joined: 6 months ago
It gives me such errors all the time
 
 
 
1. PHP Warning: Attempt to read property "before_loop" on null in public_html/wp-includes/media.php on line 5884

2. PHP Fatal error: Uncaught ValueError: Unknown format specifier "z" in =public_html/wp-content/themes/coral-light/404.php:44
Stack trace:
public_html/wp-content/themes/coral-light/404.php(44): sprintf('Spr\xC3\xB3buj poszuk...', '\xF0\x9F\x99\x82')
public_html/wp-includes/template-loader.php(106): include('/usr/home/zygza...')
public_html/wp-blog-header.php(19): require_once('/usr/home/zygza...')
public_html/index.php(17): require('/usr/home/zygza...')
{main}
thrown in public_html/wp-content/themes/coral-light/404.php on line 44
3. PHP Warning: Attempt to read property "before_loop" on null in public_html/wp-includes/media.php on line 5884
Reply
dimalifragis
Posts: 2615
(@dimalifragis)
Famed Member
Joined: 4 years ago

Error 2 (fatal) comes from your theme and Warning 1 & 3 comes from something else (shows Wordpress core but it can be anything).

Did you downgraded to PHP 8.2.x? Or even 8.1.x ?

Can you post a url, so maybe we can check more?

Reply
1 Reply
(@zygzak)
Joined: 6 months ago

Eminent Member
Posts: 19

Posted by: @dimalifragis
[/cytat]

Błąd 2 (krytyczny) pochodzi z twojego motywu, a ostrzeżenie 1 i 3 pochodzi z czegoś innego (pokazuje rdzeń Wordpressa, ale może to być cokolwiek).

Czy obniżyłeś wersję PHP 8.2.x? A może nawet 8.1.x ?

Czy możesz zamieścić adres URL, więc może sprawdzimy więcej?

 

 

I downgraded to version 8.2.15. No change.

Reply
dimalifragis
Posts: 2615
(@dimalifragis)
Famed Member
Joined: 4 years ago

before_loop if i'm correct, has something to do with lazy loading.

Reply
Posts: 19
Topic starter
(@zygzak)
Eminent Member
Joined: 6 months ago

A friend of mine has changed something in the code and there is currently no bug. Unfortunately, it will come back after the update. He doesn't know why these errors show up so much

Reply
dimalifragis
Posts: 2615
(@dimalifragis)
Famed Member
Joined: 4 years ago

What a waste of time.

Reply
Page 2 / 3