Rnb WooCommerce Rental & Booking Plugin Fatal error: Uncaught Error: syntax error, unexpected ','

Please can you tell me how I should fix this issue?
I have just purchased this and it’s not working - its crashing my wordpress site everytime I activate it.

Fatal error : Uncaught Error: syntax error, unexpected ‘,’
in /home/u518032521/domains/flexivanhire.co.uk/public_html/leasing/wp-content/plugins/woocommerce-rental-and-booking/vendor/symfony/translation-contracts/TranslatorTrait.php on line 138

Any help would be appreciated. Thanks, Marie

Hi,

Please contact the author of your purchased plugin, the author will assist you.

How to contact an author to get support or for any technical query:

Thanks

Good afternoon I need urgent help, I bought this laraclassifier script. I just updated my website but it doesn’t load perfectly, I think it’s a CSS problem. my website is mozdesapego.com can you help me how to solve this problem?

Please contact the author of your purchased script, the author will assist you. :point_up_2:

the problem the author is not providing support

yes, you are right. script author does not currently provide support for this item. in this case you will need to hire a freelancer.

Refactor that function like this. No need for “freelancer”.

private function getPluralizationRule(float $number, string $locale): int
{
    $number = abs($number);
    $locale = ('pt_BR' !== $locale && 'en_US_POSIX' !== $locale && \strlen($locale) > 3) 
                ? substr($locale, 0, strrpos($locale, '_')) 
                : $locale;

    if (in_array($locale, [
        'af', 'bn', 'bg', 'ca', 'da', 'de', 'el', 'en', 'en_US_POSIX', 'eo', 'es', 'et', 'eu', 
        'fa', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'he', 'hu', 'is', 'it', 'ku', 'lb', 
        'ml', 'mn', 'mr', 'nah', 'nb', 'ne', 'nl', 'nn', 'no', 'oc', 'om', 'or', 'pa', 'pap', 
        'ps', 'pt', 'so', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'zu'
    ])) {
        return (1 == $number) ? 0 : 1;
    }

    if (in_array($locale, ['am', 'bh', 'fil', 'fr', 'gun', 'hi', 'hy', 'ln', 'mg', 'nso', 'pt_BR', 'ti', 'wa'])) {
        return ($number < 2) ? 0 : 1;
    }

    if (in_array($locale, ['be', 'bs', 'hr', 'ru', 'sh', 'sr', 'uk'])) {
        return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : 
               ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2);
    }

    if (in_array($locale, ['cs', 'sk'])) {
        return (1 == $number) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2);
    }

    if ($locale === 'ga') {
        return (1 == $number) ? 0 : ((2 == $number) ? 1 : 2);
    }

    if ($locale === 'lt') {
        return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : 
               ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2);
    }

    if ($locale === 'sl') {
        return (1 == $number % 100) ? 0 : 
               ((2 == $number % 100) ? 1 : (((3 == $number % 100) || (4 == $number % 100)) ? 2 : 3));
    }

    if ($locale === 'mk') {
        return (1 == $number % 10) ? 0 : 1;
    }

    if ($locale === 'mt') {
        return (1 == $number) ? 0 : 
               (((0 == $number) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : 
               ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3));
    }

    if ($locale === 'lv') {
        return (0 == $number) ? 0 : (((1 == $number % 10) && (11 != $number % 100)) ? 1 : 2);
    }

    if ($locale === 'pl') {
        return (1 == $number) ? 0 : 
               ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2);
    }

    if ($locale === 'cy') {
        return (1 == $number) ? 0 : ((2 == $number) ? 1 : (((8 == $number) || (11 == $number)) ? 2 : 3));
    }

    if ($locale === 'ro') {
        return (1 == $number) ? 0 : 
               (((0 == $number) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2);
    }

    if ($locale === 'ar') {
        return (0 == $number) ? 0 : 
               ((1 == $number) ? 1 : ((2 == $number) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5))));
    }

    return 0;
}