|
From: <var...@us...> - 2017-10-02 09:11:43
|
Revision: 10035
http://sourceforge.net/p/phpwiki/code/10035
Author: vargenau
Date: 2017-10-02 09:11:41 +0000 (Mon, 02 Oct 2017)
Log Message:
-----------
Check with isset()
Modified Paths:
--------------
trunk/lib/plugin/WikiAdminRename.php
trunk/lib/stdlib.php
Modified: trunk/lib/plugin/WikiAdminRename.php
===================================================================
--- trunk/lib/plugin/WikiAdminRename.php 2017-10-01 19:00:39 UTC (rev 10034)
+++ trunk/lib/plugin/WikiAdminRename.php 2017-10-02 09:11:41 UTC (rev 10035)
@@ -56,7 +56,7 @@
public static function renameHelper($name, $from, $to, $options = array())
{
if (isset($options['regex'])) {
- return preg_replace('/' . str_replace('/', '\/', $from) . '/'.($options['icase']?'i':''), $to, $name);
+ return preg_replace('/' . str_replace('/', '\/', $from) . '/' . (isset($options['icase']) ? 'i' : ''), $to, $name);
} elseif (isset($options['icase'])) {
return str_ireplace($from, $to, $name);
} else {
Modified: trunk/lib/stdlib.php
===================================================================
--- trunk/lib/stdlib.php 2017-10-01 19:00:39 UTC (rev 10034)
+++ trunk/lib/stdlib.php 2017-10-02 09:11:41 UTC (rev 10035)
@@ -1458,7 +1458,7 @@
$glob = str_replace("/", "\\/", $glob);
// first convert some unescaped expressions to pcre style: . => \.
$special = '.^$';
- $re = preg_replace('/([^\xff])?(['.preg_quote($special, '/').'])/',
+ $re = preg_replace('/([^\xff])?([' . preg_quote($special, '/') . '])/',
"\\1\xff\\2", $glob);
// * => .*, ? => .
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|