crudbooster
crudbooster copied to clipboard
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Hi , i try to save anything in control pannel and show it the next error
Unparenthesized a ? b : c ? d : e
is deprecated. Use either (a ? b : c) ? d : e
or a ? b : (c ? d : e)
(View: C:\laragon\www\crudbooster\vendor\crocodicstudio\crudbooster\src\views\default\table.blade.php) (View: C:\laragon\www\crudbooster\vendor\crocodicstudio\crudbooster\src\views\default\table.blade.php)
try laravel 6, CB 5.5 and php 7.3
Please tell me how to solve this error, I will fix it in my project as well make a PR so this issue is fixed in next update.
try laravel 6, CB 5.5 and php 7.3
everything is checked and installed fresh project but still this issue is not resolved, please help...
I will check
- either downgrade php 7.4 to php 7.3 or 7.2
- Or just go to crudbooster\vendor\crocodicstudio\crudbooster\src\views\default\table.blade.php change the at line numbers 371 & 385 , the class names
class='filter-value-between form-control {{ (in_array($col["type_data"],["date","datetime","timestamp"]))?"datepicker":(in_array($col["type_data"],["time"]))?"timepicker":"" }}'
, it's just short hand under to avoid long if..else condition checking to adding the class to the input field as per data type of the field selected while you are building the crud. but that old syntax of short hand not supported in PHP 7.4 , so change it as per PHP 7.4 wants.
More about this at official website : https://www.php.net/manual/en/migration74.deprecated.php
help im have a error too up to php8.0
Fatal error: Unparenthesized a ? b : c ? d : e
is not supported. Use either (a ? b : c) ? d : e
or a ? b : (c ? d : e)
in ./Booking.php on line 507
There has been a critical error on this website.
there is line 506 to end // have time and know page ? $cancellationText = $cancellationHours<24 ? $cancellationHours . __(" hours", 'salon-booking-system') : $cancellationHours==24? __("1 day", 'salon-booking-system') : round($cancellationHours/24) . __("days", 'salon-booking-system'); $bookingMyAccountUrl = get_permalink($bookingMyAccountPageId); return true; }
function getTips()
{
$data = $this->getMeta('tips');
$data = empty($data) ? 0 : (float)$data;
return $data;
}
}
Has anyone got a Quick solution to this? Am having the same issue.
Have anyone solution of this problem
Have anyone solution of this problem
one way! back to free version :((!
Hi,
I think you use double ternary if, the solution is here, example:
$RequestIP = ((isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : isset($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']);
Symfony \ Component \ ErrorHandler \ Error \ FatalError
Unparenthesized a ? b : c ? d : e
is not supported. Use either (a ? b : c) ? d : e
or a ? b : (c ? d : e)
I can't downgrade my php version. any other solution please?.