WPIntell

Source evidence

PHP Warnings cluttering error log

Hide Page And Post Title · support · 2021-02-14T23:39:00+00:00

complaintsentiment
highseverity
0.91relevance
0replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 17 rows with source links

23.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

13 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
derrick_w unresolved
Thank you for this plugin. While it continued working, two conditions triggered warnings. When WP’s own twentytwentyone theme’s 404.php was used. When updating any post/page, after clearing the check box to unhide its title. Warning case #1: Attempt to read property "post_title" on null in .../hide-page-and-post-title.php on line 90 Warning case #2: Undefined array key "hpt_headertitle" in .../hide-page-and-post-title.php on line 102 Suggested hack case #1. $post == NULL. Replace the line (was 90): $this->title = $post->post_title; with this test of the $post var using ‘instanceof’ //$this->title = $post->post_title; if ($post instanceof WP_Post) { $this->title = $post->post_title; } Whenever $post is not a WP_Post object, skip trying to read the title property. Suggested hack case #2. Replaced the line (was around 102): $new = $_POST[ $this->hpt_slug ] ; with this test of the $_POST key //$new = $_POST[ $this->hpt_slug ] ; $new = isset( $_POST[ $this->hpt_slug ] ) ? $_POST[ $this->hpt_slug ] : NULL; Silence is golden. This topic was modified 5 years, 3 months ago by derrick_w .

Comments

0 shown

No comments were stored for this source.