From: <var...@us...> - 2021-11-25 17:50:48
|
Revision: 10693 http://sourceforge.net/p/phpwiki/code/10693 Author: vargenau Date: 2021-11-25 17:50:47 +0000 (Thu, 25 Nov 2021) Log Message: ----------- Avoid warning in stristr Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2021-11-25 16:56:58 UTC (rev 10692) +++ trunk/lib/WikiPlugin.php 2021-11-25 17:50:47 UTC (rev 10693) @@ -469,20 +469,13 @@ { $arguments = HTML(); foreach ($this->getDefaultArguments() as $arg => $default) { - // Work around UserPreferences plugin to avoid error - if ((is_array($default))) { - $default = '(array)'; - // This is a bit flawed with UserPreferences object - //$default = sprintf("array('%s')", - // implode("', '", array_keys($default))); - } else - if (stristr($default, ' ')) - $default = "'$default'"; + if (!empty($default) && stristr($default, ' ')) { + $default = "'$default'"; + } $arguments->pushContent("$arg=$default", HTML::br()); } return $arguments; } - } class WikiPluginLoader This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |