selfthinker / dokuwiki_plugin_wrap

Wrap Plugin for DokuWiki: Universal plugin which combines functionalities of many other plugins. Wrap wiki text inside containers (divs or spans) and give them a class (choose from a variety of preset classes), a width and/or a language with its associated text direction.
http://www.dokuwiki.org/plugin:wrap
GNU General Public License v2.0
42 stars 33 forks source link

Set default values in attr array. #237

Closed syntaxseed closed 2 years ago

syntaxseed commented 2 years ago

Fixed PHP 8.1 errors caused by lines like:

if($attr['dir'])
// Warning: Undefined array key "dir" in /lib/plugins/wrap/helper.php on line 128

By initializing hte $attr array with default false values.

$attr = array('lang' => false, 'class' => false, 'width' => false, 'id' => false, 'dir' => false);

Fixes issue #236 & #234.