WPIntell

Source evidence

comment_ID Error

Urvanov Syntax Highlighter · support · 2024-07-25T20:01:00+00:00

complaintsentiment
mediumseverity
0.86relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

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

4 / 22 rows with source links

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

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

18 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
geekcohen unresolved
Similar to https://wordpress.org/support/topic/php-warnings-168/ I am getting a PHP error [25-Jul-2024 19:56:58 UTC] PHP Notice: Trying to get property 'comment_ID' of non-object in /wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 743 [25-Jul-2024 19:56:58 UTC] PHP Notice: Trying to get property 'comment_ID' of non-object in wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 753 Plugin Version 2.8.36 PHP Version 7.4.33 WordPress 6.6.1 Looks to be related to these two functions: public static function pre_comment_text($text, $comment, $args ) { $comment_id = strval($comment->comment_ID); if (array_key_exists($comment_id, self::$comment_captures)) { // Replace with IDs now that we need to $text = self::$comment_captures[$comment_id]; } return $text; } public static function comment_text($text) { global $comment; $comment_id = strval($comment->comment_ID); // Find if this post has Crayons if (array_key_exists($comment_id, self::$comment_queue)) { // XXX We want the plain post content, no formatting $the_content_original = $text; // Loop through Crayons $post_in_queue = self::$comment_queue[$comment_id]; foreach ($post_in_queue as $id => $v) { $atts = $v['atts']; $content = $v['code']; // The code we replace post content with $crayon = self::shortcode($atts, $content, $id); $crayon_formatted = $crayon->output(TRUE, FALSE); // Replacing may cause <p> tags to become disjoint with a <div> inside them, close and reopen them if needed if (!$crayon->is_inline()) { $text = preg_replace_callback('#' . self::REGEX_BETWEEN_PARAGRAPH_SIMPLE . '#msi', 'Urvanov_Syntax_Highlighter_Plugin::add_paragraphs', $text); } // Replace the code with the Crayon $text = UrvanovSyntaxHighlighterUtil::preg_replace_escape_back(self::regex_with_id($id), $crayon_formatted, $text, 1, $text); } } return $text; } Thank you for reporting. I will try to investigate this problem. I thought I fixed it last time. That would be great, thank you. Fixed in 2.8.37. I hope. New error, not sure if it is our end or not, but comes up. [05-Aug-2024 04:09:05 UTC] PHP Notice: Trying to get property 'ID' of non-object in /home/xxxx/public_html/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 696

Comments

4 shown
urvanov 2024-07-27T06:19:00+00:00

Thank you for reporting. I will try to investigate this problem. I thought I fixed it last time.

geekcohen 2024-07-27T06:36:00+00:00

That would be great, thank you.

urvanov 2024-08-02T06:45:00+00:00

Fixed in 2.8.37. I hope.

geekcohen 2024-08-05T04:12:00+00:00

New error, not sure if it is our end or not, but comes up. [05-Aug-2024 04:09:05 UTC] PHP Notice: Trying to get property 'ID' of non-object in /home/xxxx/public_html/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 696