Jump to content
MakeWebGames

Recommended Posts

Posted

im not familiar with PDO  but im getting this error on the tickets page as well as every other page that uses the paginator

Fatal error: Uncaught Error: Typed property Paginator::$querystring must not be accessed before initializatio

 if ($_GET) {
            $args = explode('&', $_SERVER['QUERY_STRING']);
            foreach ($args as $arg) {
                $keyval = (array)explode('=', $arg);
                if ($keyval[0] !== 'page' and $keyval[0] !== 'ipp') {
                    $this->querystring .= '&'.$arg;
                }
            }
        }

its on line 71 which read as  $this->querystring .= '&'.$arg;

 

any help would be fab

Posted (edited)
3 hours ago, Magictallguy said:

Head up to the object/property declarations and initialise the $querystring property

Find:

protected string $querystring;

protected string $querystring;

Replace with:
 

protected string $querystring = '';

protected string $querystring = '';

 

That nearly worked 🙂

then I had another error 
Fatal error: Uncaught Error: Typed property Paginator::$return must not be accessed before initialization

on line 110

which is 

 for ($i = 1; $i <= $this->num_pages; ++$i) {
                $this->return .= ($i == $this->current_page) ? '<div class="pure-u-1-24 disabled"><a class="pure-button button-xsmall pure-button-disabled" href="#" disabled>'.$i.'</a></div>' : '<div class="pure-u-1-24"><a class="pure-button button-xsmall" href="'.$_SERVER['PHP_SELF'].'?page='.$i.'&ipp='.$this->items_per_page.$this->querystring.'">'.$i.'</a></div>'."\r\n";
            }

so back to square one

 

After a long and tedious struggle i managed to fix the script

Edited by Uridium

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...