dokufreaks / plugin-cloud

GNU General Public License v2.0
19 stars 13 forks source link

Fix php8 warnings #84

Closed dregad closed 2 years ago

dregad commented 2 years ago

Fixes #83

Klap-in commented 2 years ago

Thanks for the PR. Could you please set on line 45 the flag array with defaults? I prefer to have defined variables much as possible. So in this case that is just one flag if I see it right:

$flags=[
    'showCount' => false
];
Klap-in commented 2 years ago

Ah, I see double use of the flags variable, should be line 45.

dregad commented 2 years ago

Will fix

Klap-in commented 2 years ago

Might be useful to fix some php notices as well: all explodes with a limit e.g.explode('>', …, 2) could be wrapped with array_pad(…,2,'')

dregad commented 2 years ago

I fixed some with a different approach, but using array_pad may be cleaner, let me know what you prefer

Klap-in commented 2 years ago

Thank you!