PrestaShop ObjectModelCore :: hydrateCollection()

Good morning everyone,

Recently we updated a module called GDPR Compliance Pro to version 2.1.9 which should be working on our PrestaShop version 1.6.1.20 Unluckily the module is producing a white screen with the following error report: [Fri Jul 20 13:55:37.028079 2018] [proxy_fcgi:error] [pid 21477:tid 140148467533568] [client 69.162.124.228:59072] AH01071: Got error 'PHP message: PHP Catchable fatal error: Argument 2 passed to ObjectModelCore::hydrateCollection() must be of the type array, boolean given, called in /home/paardenkru/domains/paardenkruiden.nl/public_html/modules/gdprpro/src/GdprCustomScript.php on line 225 and defined in /home/paardenkru/domains/paardenkruiden.nl/public_html/classes/ObjectModel.php on line 1771 ', referer: https://www.paardenkruiden.nl

The following code is written in GdprCustomScript.php

public static function getActiveScripts($idLang = null)
{
    $table = self::$definition['table'];
    $primaryKey = self::$definition['primary'];
    $query = new DbQuery();
    $query->select('*');
    $query->from($table, 'c');
    $query->where('active = 1');
    $query->orderBy('position ASC');
    if ($idLang !== null) {
        $query->innerJoin("{$table}_lang", 'l', "c.{$primaryKey} = l.{$primaryKey} AND l.id_lang = {$idLang}");
    } else {
        $query->innerJoin("{$table}_lang", 'l', "c.{$primaryKey} = l.{$primaryKey}");
    }
    return static::hydrateCollection(
        'GdprCustomScript',
        Db::getInstance()->executeS($query),
        $idLang
    );
}

Db::getInstance()->executeS($query) is returning no rows so the result is false.

Typecast it to an array and it should be fine.

return static::hydrateCollection(
    'GdprCustomScript',
    (array)Db::getInstance()->executeS($query),
    $idLang
);