Issue on my Wordpress Site with the footer.php file

I used a debug and I get the following error: PHP Fatal error Uncaught TypeError: ceil(): Argument #1 ($num) must be of type int|float, string given in /var/www/html/wp-content/themes/ark/footer.php:20

The line reads like this:

$linkOffsetSM = ceil( ffThemeOptions::getQuery('layout')->getWithoutComparationDefault('smoothscroll-sharplink-offset-sm', '') );

The full div:

<div
        class="hidden smoothscroll-sharplink"
        data-speed="<?php echo absint( ffThemeOptions::getQuery('layout')->getWithoutComparationDefault('smoothscroll-sharplink-speed', 1000) ); ?>"

        <?php

            $linkOffsetXS = ceil( ffThemeOptions::getQuery('layout')->getWithoutComparationDefault('smoothscroll-sharplink-offset', 0) );
            if ( empty($linkOffsetXS) ){
                $linkOffsetXS = 0;
            }

            $linkOffsetSM = ceil( ffThemeOptions::getQuery('layout')->getWithoutComparationDefault('smoothscroll-sharplink-offset-sm', '') );
            if ( empty($linkOffsetSM) ){
                $linkOffsetSM = $linkOffsetXS;
            }

            $linkOffsetMD = ceil( ffThemeOptions::getQuery('layout')->getWithoutComparationDefault('smoothscroll-sharplink-offset-md', '') );
            if ( empty($linkOffsetMD) ){
                $linkOffsetMD = $linkOffsetSM;
            }

            $linkOffsetLG = ceil( ffThemeOptions::getQuery('layout')->getWithoutComparationDefault('smoothscroll-sharplink-offset-lg', '') );
            if ( empty($linkOffsetLG) ){
                $linkOffsetLG = $linkOffsetMD;
            }

        ?>

        data-offset-xs="<?php echo $linkOffsetXS; ?>"
        data-offset-sm="<?php echo $linkOffsetSM; ?>"
        data-offset-md="<?php echo $linkOffsetMD; ?>"
        data-offset-lg="<?php echo $linkOffsetLG; ?>"
    ></div>

I'm a novice at best with this. The footer.php is messing up my margins on my site. When the file is deleted the site displays perfectly but without a footer. Need to correct the issue in the footer and I'm not sure how.



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation