WebsiteBaker Community Forum

WebsiteBaker Support (2.13.x) => General Help & Support => Topic started by: rumen on November 08, 2024, 08:15:11 AM

Title: Whatever I try to install as template I get one and same error
Post by: rumen on November 08, 2024, 08:15:11 AM
Hi there, WB 2.13.5 r220

When I try to install any template I get one and the same error message:

Code: [Select]
There was an uncatched exception
database::escapeString(): Argument #1 ($unescaped_string) must be of type string, bool given, called in /var/www/html/test/framework/functions.php on line 1166
in line (259) of (/framework/class.database.php):

in class.database.php that is:
Code: [Select]
public function escapeString(string $unescaped_string)
    {
        return \mysqli_real_escape_string($this->oDbHandle, $unescaped_string);
    }

and in functions.php it is:
Code: [Select]
                        . '`function`=\''.$database->escapeString($template_function).'\', '.PHP_EOL

What doesn't like in the templates? They are from the web site WB templates. I attach one.
Title: Re: Whatever I try to install as template I get one and same error
Post by: dbs on November 08, 2024, 09:09:30 AM
Hi, in the info.php is this line missing:
Code: [Select]
$template_function     = 'template';
Compare with info.php from DefaultTemplate
Title: Re: Whatever I try to install as template I get one and same error
Post by: rumen on November 08, 2024, 09:30:57 AM
Hm, that helped. Thanks a lot.