giterlizzi / dokuwiki-plugin-datatables

Add DataTables support to DokuWiki
GNU General Public License v2.0
10 stars 11 forks source link

PHP 8 compatibility -> "Warning: Undefined array key "en" in /lib/plugins/datatables/action.php on line 101 #59

Open mikeploeger opened 3 years ago

mikeploeger commented 3 years ago

If the plugin operates under PHP8, it generates the following error on every DokuWiki Page:

PHP 8 compatibility -> "Warning: Undefined array key "en" in /lib/plugins/datatables/action.php on line 101

Are any fixes available?

mikeploeger commented 2 years ago

Edit action.php:

Old:

        'sq'          => 'Albanian',
    );

New:

        'sq'          => 'Albanian',
        'en'          => 'English',
    );
mikeploeger commented 2 years ago

If you want a PR @giterlizzi ?

demiankatz commented 2 years ago

I encountered the same problem, and came up with the same workaround. But I'm not entirely clear on what the purpose of the i18n property is. It looks like it's being used to load files that match the pattern /assets/datatables.net-plugins/i18n/en/English.lang but there are no files at all in /assets/datatables.net-plugins/i18n. Is all of this logic pointless, or am I misunderstanding something?