Home > other >  Uncaught Error: Call to a member function get() on null (easy photography plugin Wordpress)
Uncaught Error: Call to a member function get() on null (easy photography plugin Wordpress)

Time:05-24

I have a website with an old theme no longer supported and with a photographic plugin for the portfolio. The backend of the website is a blank page if the plugin is active, when the plugin is not active, all work fine (except for the homepage because use the plugin). I just read all the similar question but I don't have so many knowledge on php for understand what is the problem and if there is a solution or I have to change the theme.

The problem is in line 286 and this is what I see:

    private function get_queried_object_id() {

    $id = (int) get_queried_object_id();

    if ( ! $id ) {
        $id = (int) $this->original_query->get( 'page_id' );
    }

    return $id;
}

Thanks in advance!and sorry if I miss something but is my first post here.

CodePudding user response:

private function get_queried_object_id() {

  $id = (int) $this->get_queried_object_id();

  if ( ! $id ) {
    $id = (int) $this->original_query->get( 'page_id' );
  }

  return $id;
}

try this

  • Related