e107inc/e107

View on GitHub
page.php

Summary

Maintainability
A
0 mins
Test Coverage
F
8%

Argument 2 (pluginName) is null but \e107::getScBatch() takes string defined at /code/e107_handlers/e107_class.php:1608
Open

        $this->batch     = e107::getScBatch('page',null,'cpage');
Severity: Minor
Found in page.php by phan

Argument 2 (content) is string but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('og:image',$mimg);
Severity: Minor
Found in page.php by phan

Invalid offset "chapter_parent" of array type array{book_id:int}|array{book_sef:}|null
Open

        $row['book_name']             = $this->getName($row['chapter_parent']);
Severity: Minor
Found in page.php by phan

Assigning array<string>|array<string>|array<string></string></string></string> to property but \pageClass->page is array<string></string>
Open

        $this->page['comments']         = $comments;
Severity: Minor
Found in page.php by phan

Argument 2 (content) is string but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('og:description', $metaDiz);
Severity: Minor
Found in page.php by phan

Argument 2 (content) is string but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('og:image',$mimg);
Severity: Minor
Found in page.php by phan

Reference to undeclared constant \BULLET
Open

            $this->bullet = "<img src='".THEME_ABS."images/".BULLET."' alt='' class='icon' />";
Severity: Minor
Found in page.php by phan

Assigning array<string></string> to property but \pageClass->page is array<string></string>
Open

        $this->page['err']                 = false;
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'twitter:card' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:card', 'summary_large_image');
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'og:updated_time' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

        e107::meta('og:updated_time', strtotime('10 minutes ago'));
Severity: Minor
Found in page.php by phan

Variable $row is undeclared
Open

    unset($row);
Severity: Minor
Found in page.php by phan

Invalid offset "chapter_parent" of array type array{book_id:int}|array{book_name:mixed}|array{book_sef:}|null
Open

        $row['book_icon']            = $this->getIcon($row['chapter_parent']);
Severity: Minor
Found in page.php by phan

Call with 2 arg(s) to \pageClass::listChapters() which only takes 1 arg(s) defined at /code/page.php:339
Open

                $listChapters = $this->listChapters(intval($row['chapter_id']), $row['chapter_sef']);
Severity: Info
Found in page.php by phan

Argument 1 (name) is 'og:image' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('og:image',$mimg);
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'twitter:image' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:image', $mimg);
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'twitter:image' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:image', $mimg);
Severity: Minor
Found in page.php by phan

Invalid offset "caption" of array type array{}
Open

    e107::getRender()->tablerender($e107CorePage->pageOutput['caption'], $e107CorePage->pageOutput['text'], 'cpage-chapter-list');
Severity: Minor
Found in page.php by phan

Argument 2 (content) is string but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:description', $metaDiz);
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'og:image' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('og:image',$mimg);
Severity: Minor
Found in page.php by phan

When fetching an array index from a value of type array{}|null[], found an array index of type null, but expected the index to be of the non-nullable type int|string
Open

        return varset($this->chapterData[$chapter]['chapter_icon'], false);            
Severity: Minor
Found in page.php by phan

Assigning array<string></string> to property but \pageClass->page is array<string></string>
Open

            $this->page['cachecontrol'] = false;
Severity: Minor
Found in page.php by phan

Argument 2 (content) is string but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:image', $mimg);
Severity: Minor
Found in page.php by phan

Argument 2 (content) is 'summary_large_image' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:card', 'summary_large_image');
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'robots' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('robots', $this->page['page_metarobots']);
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'twitter:description' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:description', $metaDiz);
Severity: Minor
Found in page.php by phan

Argument 2 (options) is 'w=1200' but \e_parse::thumbUrl() takes array defined at /code/e107_handlers/e_parse_class.php:2531
Open

            $mimg = $tp->thumbUrl($this->page['menu_image'],'w=1200', false, true);
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'twitter:image' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:image', $im);
Severity: Minor
Found in page.php by phan

Invalid offset "chapter_parent" of array type array{book_id:int}|array{book_name:mixed}|array{book_sef:mixed}|null
Open

        $row['book_icon']            = $this->getIcon($row['chapter_parent']);
Severity: Minor
Found in page.php by phan

Invalid offset "chapter_parent" of array type array{book_icon:mixed}|array{book_id:int}|array{book_name:mixed}|array{book_sef:mixed}|null
Open

        $row['book_description']    = $this->getDescription($row['chapter_parent']);
Severity: Minor
Found in page.php by phan

Call to undeclared method \e_db::db_getList
Open

                $pageArray = $sql->db_getList();
Severity: Critical
Found in page.php by phan

Argument 2 (content) is string but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

        e107::meta('twitter:title', $metaTitle);
Severity: Minor
Found in page.php by phan

Argument 2 (content) is string but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('keywords', eHelper::formatMetaKeys($this->page['page_metakeys']));
Severity: Minor
Found in page.php by phan

Assigning true to property but \pageClass->authorized is string
Open

            $this->authorized = true;
Severity: Minor
Found in page.php by phan

When fetching an array index from a value of type array{}|null[], found an array index of type null, but expected the index to be of the non-nullable type int|string
Open

        return varset($this->chapterData[$chapter]['chapter_name'], false);            
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'keywords' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('keywords', eHelper::formatMetaKeys($this->page['page_metakeys']));
Severity: Minor
Found in page.php by phan

Call to undeclared method \e_shortcode::cpagecomments
Open

            $comments = $sc->cpagecomments();
Severity: Critical
Found in page.php by phan

Assigning true to property but \pageClass->authorized is string
Open

                $this->authorized = true;
Severity: Minor
Found in page.php by phan

Argument 1 (caption) is null but \e_render::tablerender() takes string defined at /code/e107_handlers/e_render_class.php:314
Open

    e107::getRender()->tablerender($e107CorePage->pageOutput['caption'], $e107CorePage->pageOutput['text'], 'cpage-chapter-list');
Severity: Minor
Found in page.php by phan

Invalid offset "chapter_parent" of array type array{book_id:int}|array{book_sef:mixed}|null
Open

        $row['book_name']             = $this->getName($row['chapter_parent']);
Severity: Minor
Found in page.php by phan

When fetching an array index from a value of type array{}|null[], found an array index of type null, but expected the index to be of the non-nullable type int|string
Open

        return varset($this->chapterData[$chapter]['chapter_meta_description'], false);            
Severity: Minor
Found in page.php by phan

Assigning array<string></string> to property but \pageClass->page is array<string></string>
Open

            $this->page['err'] = TRUE;
Severity: Minor
Found in page.php by phan

Argument 2 (content) is 'summary_large_image' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:card', 'summary_large_image');
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'twitter:card' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:card', 'summary_large_image');
Severity: Minor
Found in page.php by phan

Argument 2 (pluginName) is null but \e107::getScBatch() takes string defined at /code/e107_handlers/e107_class.php:1608
Open

            $sc = e107::getScBatch('page',null,'cpage');
Severity: Minor
Found in page.php by phan

Argument 5 (pid) is null but \comment::enter_comment() takes \unknown_type|string defined at /code/e107_handlers/comment_class.php:675
Open

                $cobj->enter_comment($_POST['author_name'], $_POST['comment'], "page", $this->pageID, $pid, $_POST['subject']);
Severity: Minor
Found in page.php by phan

Argument 2 (override) is true but \e107::title() takes false|string defined at /code/e107_handlers/e107_class.php:2885
Open

            e107::title(eHelper::formatMetaTitle($this->page['page_metatitle']),true);
Severity: Minor
Found in page.php by phan

Argument 2 (content) is string but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:image', $mimg);
Severity: Minor
Found in page.php by phan

Argument 2 (text) is null but \e_render::tablerender() takes string defined at /code/e107_handlers/e_render_class.php:314
Open

    e107::getRender()->tablerender($e107CorePage->pageOutput['caption'], $e107CorePage->pageOutput['text'], 'cpage-chapter-list');
Severity: Minor
Found in page.php by phan

Argument 2 (pluginName) is null but \e107::getScBatch() takes string defined at /code/e107_handlers/e107_class.php:1608
Open

        $this->batch = e107::getScBatch('page',null,'cpage');
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'twitter:title' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

        e107::meta('twitter:title', $metaTitle);
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'og:description' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('og:description', $metaDiz);
Severity: Minor
Found in page.php by phan

Argument 2 (content) is false|int but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

        e107::meta('og:updated_time', strtotime('10 minutes ago'));
Severity: Minor
Found in page.php by phan

Argument 2 (pluginName) is null but \e107::getScBatch() takes string defined at /code/e107_handlers/e107_class.php:1608
Open

            $this->batch = e107::getScBatch('page',null,'cpage')->setVars($this->page)->wrapper('page/'.$this->templateID);
Severity: Minor
Found in page.php by phan

Argument 1 (name) is 'og:image' but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('og:image',($im));
Severity: Minor
Found in page.php by phan

Invalid offset "text" of array type array{}
Open

    e107::getRender()->tablerender($e107CorePage->pageOutput['caption'], $e107CorePage->pageOutput['text'], 'cpage-chapter-list');
Severity: Minor
Found in page.php by phan

Suspicious array access to null
Open

        $row['book_sef']            = $this->getSef($row['chapter_parent']);
Severity: Minor
Found in page.php by phan

Invalid offset "chapter_parent" of array type array{book_sef:}|null
Open

        $row['book_id']             = (int) $row['chapter_parent'];
Severity: Minor
Found in page.php by phan

Assigning array<string></string> to property but \pageClass->page is array<string></string>
Open

        $this->page['cachecontrol']     = (isset($this->page['page_password']) && !$this->page['page_password'] && $this->authorized === true);
Severity: Minor
Found in page.php by phan

Argument 2 (content) is array|string|string[] but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('og:image',($im));
Severity: Minor
Found in page.php by phan

Assigning true to property but \pageClass->authorized is string
Open

                $this->authorized = true;
Severity: Minor
Found in page.php by phan

Argument 2 (fields) is true but \e_db::retrieve() takes string defined at /code/e107_handlers/e_db_interface.php:153
Open

        $books = e107::getDb()->retrieve("SELECT chapter_id,chapter_sef,chapter_name,chapter_parent,chapter_meta_description,chapter_image,chapter_icon FROM #page_chapters ORDER BY chapter_id ASC" , true);
Severity: Minor
Found in page.php by phan

Invalid offset "chapter_parent" of array type array{book_sef:mixed}|null
Open

        $row['book_id']             = (int) $row['chapter_parent'];
Severity: Minor
Found in page.php by phan

Invalid offset "chapter_parent" of array type array{book_icon:mixed}|array{book_id:int}|array{book_name:mixed}|array{book_sef:}|null
Open

        $row['book_description']    = $this->getDescription($row['chapter_parent']);
Severity: Minor
Found in page.php by phan

Argument 2 (options) is 'w=1200' but \e_parse::thumbUrl() takes array defined at /code/e107_handlers/e_parse_class.php:2531
Open

            $mimg = $tp->thumbUrl($this->page['page_metaimage'],'w=1200', false, true);
Severity: Minor
Found in page.php by phan

Argument 2 (content) is array|string|string[] but \e107::meta() takes null defined at /code/e107_handlers/e107_class.php:2861
Open

            e107::meta('twitter:image', $im);
Severity: Minor
Found in page.php by phan

Suspicious type true of a variable or expression used to build a string. (Expected type to be able to cast to a string)
Open

            echo "<b>multipageFlag</b> ".$this->multipageFlag." <br />";
Severity: Minor
Found in page.php by phan

There are no issues that match your filters.

Category
Status