• Resolved MaxRGB

    (@maxrgb)


    Method guest_author_name() of the plugin contains log output of post id and author name. Tell me please, what is that for?
    Version 4.32 (Stable Tag 4.33)

    function guest_author_name( $name ) {
    	$id = $this->get_post_id();
    	error_log( 'post-id=' . $id );
    	$author = get_post_meta( $id, 'sfly_guest_author_names', true );
    	if ( $author ) {
    		$name = $author;
    		error_log( $author );
    	}
    	return $name;
    }
    • This topic was modified 2 years, 5 months ago by MaxRGB.
    • This topic was modified 2 years, 5 months ago by MaxRGB.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author A. Jones

    (@nomadcoder)

    The error_log function is used for debugging when logging is turned on in the wp-config file. Looks like this one was used to check the post id.

    Thread Starter MaxRGB

    (@maxrgb)

    Usually error_log is used to send error messages, exceptions. Besides, guest_author_name() method does not handle exceptions, but just gets post id and author name (then returns it).
    Probably it is just a forgotten piece of debug code. Will you remove it?

    • This reply was modified 2 years, 5 months ago by MaxRGB.
    Plugin Author A. Jones

    (@nomadcoder)

    It’s also often used by developers to write to the log file for debugging. It is probably just a forgotten piece of debug code. Thanks for pointing it out.

    Thread Starter MaxRGB

    (@maxrgb)

    Thank you.

    Hi @nomadcoder, is this issue to be resolved in an upcoming update? We just encountered the same thing on our website and it ended up filling our log files.

    Plugin Author A. Jones

    (@nomadcoder)

    Hello,

    An updated release is scheduled for the weekend.

    Perfect, thank you for the quick reply ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Log output of post id and author name’ is closed to new replies.