Support » Plugin: WordPress SEO Plugin - Rank Math » PHP Notice: Undefined variable: post in

  • Hello! The plugin issues a warning

    PHP Notice: Undefined variable: post in site\wp-content\plugins\seo-by-rank-math\includes\frontend\class-add-attributes.php on line 280

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author MyThemeShop

    (@mythemeshop)

    Hello @artabr

    Thank you for contacting the support.

    Please update to the latest version. It should be all good.

    Feel free to open a new support ticket in case you need any assistance.

    We are here to help.

    This is just on the most recent version of the plugin errors are issued. There you have a wrong record object is called. The value of a variable that is not defined is passed to the method.
    You have so

    	private function set_image_attribute( &$attrs, $attribute, $condition, &$is_dirty ) {
    		if ( $condition && empty( $attrs[ $attribute ] ) ) {
    			$is_dirty            = true;
    			$attrs[ $attribute ] = trim( Helper::replace_vars( $condition, $post ) );
    		}
    	}

    And so it is necessary

    	private function set_image_attribute( &$attrs, $attribute, $condition, &$is_dirty ) {
    		if ( $condition && empty( $attrs[ $attribute ] ) ) {
    			$is_dirty            = true;
    			$attrs[ $attribute ] = trim( Helper::replace_vars( $condition, $this->get_post() ) );
    		}
    	}
    Plugin Author MyThemeShop

    (@mythemeshop)

    Hello @artabr

    We released an update some time back.

    Can you please confirm the version of the plugin on your website?

    Looking forward to helping you. Thank you.

    Sorry! Apparently the update came to me immediately. Yes, in version 1.0.16, everything is fine. thank

    PS Great plugin! Recorded a video review of the plugin, though in Russian, but still

    Plugin Author MyThemeShop

    (@mythemeshop)

    Hello @artabr

    We are happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

    P.S. The link of the video is not opening.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.