PHP fatal error
-
PHP Fatal error: Uncaught Error: Call to a member function get_page_permastruct() on null in /home/user/domains/site.com/public_html/wp-includes/link-template.php:357nStack trace:n#0 /home/user/domains/site.com/public_html/wp-includes/link-template.php(320): _get_page_link(Object(WP_Post), false, false)n#1 /home/user/domains/site.com/public_html/wp-includes/link-template.php(144): get_page_link(Object(WP_Post), false, false)n#2 /home/user/domains/site.com/public_html/wp-content/plugins/udinra-all-image-sitemap/img/udinra_img_loop.php(6): get_permalink(Object(WP_Post))n#3 /home/user/domains/site.com/public_html/wp-content/plugins/udinra-all-image-sitemap/img/udinra_img.php(55): include('/home/user...')n#4 /home/user/domains/site.com/public_html/wp-content/plugins/udinra-all-image-sitemap/udinra-all-image-sitemap.php(29): include('/home/user...')n#5 /home/user/domains/site.com/public_html/wp-content/p in /home/user/domains/site.com/public_html/wp-includes/link-template.php on line 357
I added an extra if in your img loop file
AFTER
$udinra_cur_post_id = $udinra_post->post_parent; if($udinra_cur_post_id != 0) { if($udinra_cur_post_id != $udinra_prev_post_id) {
I added all IF code within
if(isset($udinra_cur_post_id) && is_integer($udinra_cur_post_id)) {
- The topic ‘PHP fatal error’ is closed to new replies.