Is Datatable Editor PHP 8.0 compatible ?
I believe so, but Colin is going to spin up a PHP 8 instance just to confirm. He'll report back here when done.
Yep, I just installed REMI PHP 8.0.2 and all our tests ran through smoothly so it looks good as Allan predicted.
Hello, further to this, I ran up a PHP 8.1.1 and got problems into the JSON where my DB date and date time fields default to NULL
These are the php_error_log
[12-Jan-2022 10:23:51 Australia/Melbourne] PHP Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /Applications/XAMPP/xamppfiles/htdocs/consuls/php/lib/Editor/Format.php on line 67
[12-Jan-2022 10:23:51 Australia/Melbourne] PHP Deprecated: date_create_from_format(): Passing null to parameter #2 ($datetime) of type string is deprecated in /Applications/XAMPP/xamppfiles/htdocs/consuls/php/lib/Editor/Format.php on line 128
Thanks for letting me know about that - fixed here and will be in the next Editor release, which I'll be dropping soon.
In version 2.0.7, you still have usage of create_function which has been removed from php8. This is in file htmlawed.php. I don't know when this file gets used, but this would error out in php8. It can easily be replaced with a proper anonymous function.
Many thanks for flagging that up. I've updated to the latest version of HtmLawed which addresses this issue. It will be included in the next release of Editor, or you can use that file directly at the moment.
htmlawed 1.2.6 return errors with php 8.1.6 Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in \www\dafaction\lib\HtmLawed\Htmlawed.php on line 95
Htmlawed.php (and all php files) need to be modified to ensure no optional string type parameter is passed as null in some php function:
explode, preg_replace, preg_replace_callback, ....
example line 95, 102, 109, ....
I do job until 3.20 AM and need to go to bed... I just activate PHP 8.1.6, do changes in a lot of php files, and then (after posting prod files) find a bug in a module (don't know where Htmlawed is called) and 2 solutions were possible... go back to php 7 or find a solution...
Hope the production version is still stable...
Htmlawed is called as part of the XSS protection. You could bypass it by adding ->xss(false) to the fields. Sorry you’ve run into a problem here - I will get on to this next week.
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.