Completed
Push — 1.2 ( 261ddf...fd7ca1 )
by David
15:45 queued 09:58
created
lib/plugins/builtin/functions/extendsCheck.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -19,26 +19,26 @@  discard block
 block discarded – undo
19 19
  */
20 20
 function Dwoo_Plugin_extendsCheck_compile(Dwoo_Compiler $compiler, $file)
21 21
 {
22
-    preg_match('#^["\']([a-z]{2,}):(.*?)["\']$#i', $file, $m);
23
-    $resource = $m[1];
24
-    $identifier = $m[2];
22
+	preg_match('#^["\']([a-z]{2,}):(.*?)["\']$#i', $file, $m);
23
+	$resource = $m[1];
24
+	$identifier = $m[2];
25 25
 
26
-    $tpl = $compiler->getDwoo()->templateFactory($resource, $identifier);
26
+	$tpl = $compiler->getDwoo()->templateFactory($resource, $identifier);
27 27
 
28
-    if ($tpl === null) {
29
-        throw new Dwoo_Compilation_Exception($compiler, 'Load Templates : Resource "'.$resource.':'.$identifier.'" not found.');
30
-    } elseif ($tpl === false) {
31
-        throw new Dwoo_Compilation_Exception($compiler, 'Load Templates : Resource "'.$resource.'" does not support includes.');
32
-    }
28
+	if ($tpl === null) {
29
+		throw new Dwoo_Compilation_Exception($compiler, 'Load Templates : Resource "'.$resource.':'.$identifier.'" not found.');
30
+	} elseif ($tpl === false) {
31
+		throw new Dwoo_Compilation_Exception($compiler, 'Load Templates : Resource "'.$resource.'" does not support includes.');
32
+	}
33 33
 
34
-    $out = '\'\';// checking for modification in '.$resource.':'.$identifier."\r\n";
34
+	$out = '\'\';// checking for modification in '.$resource.':'.$identifier."\r\n";
35 35
 
36
-    $modCheck = $tpl->getIsModifiedCode();
36
+	$modCheck = $tpl->getIsModifiedCode();
37 37
 
38
-    if ($modCheck) {
39
-        $out .= 'if (!('.$modCheck.')) { ob_end_clean(); return false; }';
40
-    } else {
41
-        $out .= 'try {
38
+	if ($modCheck) {
39
+		$out .= 'if (!('.$modCheck.')) { ob_end_clean(); return false; }';
40
+	} else {
41
+		$out .= 'try {
42 42
 	$tpl = $this->templateFactory("'.$resource.'", "'.$identifier.'");
43 43
 } catch (Dwoo_Exception $e) {
44 44
 	$this->triggerError(\'Load Templates : Resource <em>'.$resource.'</em> was not added to Dwoo, can not extend <em>'.$identifier.'</em>\', E_USER_WARNING);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 elseif ($tpl === false)
49 49
 	$this->triggerError(\'Load Templates : Resource "'.$resource.'" does not support extends.\', E_USER_WARNING);
50 50
 if ($tpl->getUid() != "'.$tpl->getUid().'") { ob_end_clean(); return false; }';
51
-    }
51
+	}
52 52
 
53
-    return $out;
53
+	return $out;
54 54
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/wordwrap.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
24 24
  */
25 25
 function Dwoo_Plugin_wordwrap_compile(Dwoo_Compiler $compiler, $value, $length = 80, $break = "\n", $cut = false)
26 26
 {
27
-    return 'wordwrap('.$value.','.$length.','.$break.','.$cut.')';
27
+	return 'wordwrap('.$value.','.$length.','.$break.','.$cut.')';
28 28
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/math.php 2 patches
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -33,99 +33,99 @@
 block discarded – undo
33 33
  */
34 34
 function Dwoo_Plugin_math_compile(Dwoo_Compiler $compiler, $equation, $format = '', $assign = '', array $rest = array())
35 35
 {
36
-    /*
36
+	/*
37 37
      * Holds the allowed function, characters, operators and constants
38 38
      */
39
-    $allowed = array(
40
-        '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
41
-        '+', '-', '/', '*', '.', ' ', '<<', '>>', '%', '&', '^', '|', '~',
42
-        'abs(', 'ceil(', 'floor(', 'exp(', 'log10(',
43
-        'cos(', 'sin(', 'sqrt(', 'tan(',
44
-        'M_PI', 'INF', 'M_E',
45
-    );
39
+	$allowed = array(
40
+		'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
41
+		'+', '-', '/', '*', '.', ' ', '<<', '>>', '%', '&', '^', '|', '~',
42
+		'abs(', 'ceil(', 'floor(', 'exp(', 'log10(',
43
+		'cos(', 'sin(', 'sqrt(', 'tan(',
44
+		'M_PI', 'INF', 'M_E',
45
+	);
46 46
 
47
-    /*
47
+	/*
48 48
      * Holds the functions that can accept multiple arguments
49 49
      */
50
-    $funcs = array(
51
-        'round(', 'log(', 'pow(',
52
-        'max(', 'min(', 'rand(',
53
-    );
50
+	$funcs = array(
51
+		'round(', 'log(', 'pow(',
52
+		'max(', 'min(', 'rand(',
53
+	);
54 54
 
55
-    $equation = $equationSrc = str_ireplace(array('pi', 'M_PI()', 'inf', ' e '), array('M_PI', 'M_PI', 'INF', ' M_E '), $equation);
55
+	$equation = $equationSrc = str_ireplace(array('pi', 'M_PI()', 'inf', ' e '), array('M_PI', 'M_PI', 'INF', ' M_E '), $equation);
56 56
 
57
-    $delim = $equation[0];
58
-    $open = $delim.'.';
59
-    $close = '.'.$delim;
60
-    $equation = substr($equation, 1, -1);
61
-    $out = '';
62
-    $ptr = 1;
63
-    $allowcomma = 0;
64
-    while (strlen($equation) > 0) {
65
-        $substr = substr($equation, 0, $ptr);
66
-        if (array_search($substr, $allowed) !== false) {
67
-            // allowed string
68
-            $out .= $substr;
69
-            $equation = substr($equation, $ptr);
70
-            $ptr = 0;
71
-        } elseif (array_search($substr, $funcs) !== false) {
72
-            // allowed func
73
-            $out .= $substr;
74
-            $equation = substr($equation, $ptr);
75
-            $ptr = 0;
76
-            ++$allowcomma;
77
-            if ($allowcomma === 1) {
78
-                $allowed[] = ',';
79
-            }
80
-        } elseif (isset($rest[$substr])) {
81
-            // variable
82
-            $out .= $rest[$substr];
83
-            $equation = substr($equation, $ptr);
84
-            $ptr = 0;
85
-        } elseif ($substr === $open) {
86
-            // pre-replaced variable
87
-            preg_match('#.*\((?:[^()]*?|(?R))\)'.str_replace('.', '\\.', $close).'#', substr($equation, 2), $m);
88
-            if (empty($m)) {
89
-                preg_match('#.*?'.str_replace('.', '\\.', $close).'#', substr($equation, 2), $m);
90
-            }
91
-            $out .= substr($m[0], 0, -2);
92
-            $equation = substr($equation, strlen($m[0]) + 2);
93
-            $ptr = 0;
94
-        } elseif ($substr === '(') {
95
-            // opening parenthesis
96
-            if ($allowcomma > 0) {
97
-                ++$allowcomma;
98
-            }
57
+	$delim = $equation[0];
58
+	$open = $delim.'.';
59
+	$close = '.'.$delim;
60
+	$equation = substr($equation, 1, -1);
61
+	$out = '';
62
+	$ptr = 1;
63
+	$allowcomma = 0;
64
+	while (strlen($equation) > 0) {
65
+		$substr = substr($equation, 0, $ptr);
66
+		if (array_search($substr, $allowed) !== false) {
67
+			// allowed string
68
+			$out .= $substr;
69
+			$equation = substr($equation, $ptr);
70
+			$ptr = 0;
71
+		} elseif (array_search($substr, $funcs) !== false) {
72
+			// allowed func
73
+			$out .= $substr;
74
+			$equation = substr($equation, $ptr);
75
+			$ptr = 0;
76
+			++$allowcomma;
77
+			if ($allowcomma === 1) {
78
+				$allowed[] = ',';
79
+			}
80
+		} elseif (isset($rest[$substr])) {
81
+			// variable
82
+			$out .= $rest[$substr];
83
+			$equation = substr($equation, $ptr);
84
+			$ptr = 0;
85
+		} elseif ($substr === $open) {
86
+			// pre-replaced variable
87
+			preg_match('#.*\((?:[^()]*?|(?R))\)'.str_replace('.', '\\.', $close).'#', substr($equation, 2), $m);
88
+			if (empty($m)) {
89
+				preg_match('#.*?'.str_replace('.', '\\.', $close).'#', substr($equation, 2), $m);
90
+			}
91
+			$out .= substr($m[0], 0, -2);
92
+			$equation = substr($equation, strlen($m[0]) + 2);
93
+			$ptr = 0;
94
+		} elseif ($substr === '(') {
95
+			// opening parenthesis
96
+			if ($allowcomma > 0) {
97
+				++$allowcomma;
98
+			}
99 99
 
100
-            $out .= $substr;
101
-            $equation = substr($equation, $ptr);
102
-            $ptr = 0;
103
-        } elseif ($substr === ')') {
104
-            // closing parenthesis
105
-            if ($allowcomma > 0) {
106
-                --$allowcomma;
107
-                if ($allowcomma === 0) {
108
-                    array_pop($allowed);
109
-                }
110
-            }
100
+			$out .= $substr;
101
+			$equation = substr($equation, $ptr);
102
+			$ptr = 0;
103
+		} elseif ($substr === ')') {
104
+			// closing parenthesis
105
+			if ($allowcomma > 0) {
106
+				--$allowcomma;
107
+				if ($allowcomma === 0) {
108
+					array_pop($allowed);
109
+				}
110
+			}
111 111
 
112
-            $out .= $substr;
113
-            $equation = substr($equation, $ptr);
114
-            $ptr = 0;
115
-        } elseif ($ptr >= strlen($equation)) {
116
-            // parse error if we've consumed the entire equation without finding anything valid
117
-            throw new Dwoo_Compilation_Exception($compiler, 'Math : Syntax error or variable undefined in equation '.$equationSrc.' at '.$substr);
118
-        } else {
119
-            // nothing special, advance
120
-            ++$ptr;
121
-        }
122
-    }
123
-    if ($format !== '\'\'') {
124
-        $out = 'sprintf('.$format.', '.$out.')';
125
-    }
126
-    if ($assign !== '\'\'') {
127
-        return '($this->assignInScope('.$out.', '.$assign.'))';
128
-    }
112
+			$out .= $substr;
113
+			$equation = substr($equation, $ptr);
114
+			$ptr = 0;
115
+		} elseif ($ptr >= strlen($equation)) {
116
+			// parse error if we've consumed the entire equation without finding anything valid
117
+			throw new Dwoo_Compilation_Exception($compiler, 'Math : Syntax error or variable undefined in equation '.$equationSrc.' at '.$substr);
118
+		} else {
119
+			// nothing special, advance
120
+			++$ptr;
121
+		}
122
+	}
123
+	if ($format !== '\'\'') {
124
+		$out = 'sprintf('.$format.', '.$out.')';
125
+	}
126
+	if ($assign !== '\'\'') {
127
+		return '($this->assignInScope('.$out.', '.$assign.'))';
128
+	}
129 129
 
130
-    return '('.$out.')';
130
+	return '('.$out.')';
131 131
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
                 preg_match('#.*?'.str_replace('.', '\\.', $close).'#', substr($equation, 2), $m);
90 90
             }
91 91
             $out .= substr($m[0], 0, -2);
92
-            $equation = substr($equation, strlen($m[0]) + 2);
92
+            $equation = substr($equation, strlen($m[0])+2);
93 93
             $ptr = 0;
94 94
         } elseif ($substr === '(') {
95 95
             // opening parenthesis
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/lower.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,5 +21,5 @@
 block discarded – undo
21 21
  */
22 22
 function Dwoo_Plugin_lower_compile(Dwoo_Compiler $compiler, $value)
23 23
 {
24
-    return 'mb_strtolower((string) '.$value.', $this->charset)';
24
+	return 'mb_strtolower((string) '.$value.', $this->charset)';
25 25
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/mailto.php 1 patch
Indentation   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -29,94 +29,94 @@
 block discarded – undo
29 29
  */
30 30
 function Dwoo_Plugin_mailto(Dwoo_Core $dwoo, $address, $text = null, $subject = null, $encode = null, $cc = null, $bcc = null, $newsgroups = null, $followupto = null, $extra = null)
31 31
 {
32
-    if (empty($address)) {
33
-        return '';
34
-    }
35
-    if (empty($text)) {
36
-        $text = $address;
37
-    }
38
-
39
-    // build address string
40
-    $address .= '?';
41
-
42
-    if (!empty($subject)) {
43
-        $address .= 'subject='.rawurlencode($subject).'&';
44
-    }
45
-    if (!empty($cc)) {
46
-        $address .= 'cc='.rawurlencode($cc).'&';
47
-    }
48
-    if (!empty($bcc)) {
49
-        $address .= 'bcc='.rawurlencode($bcc).'&';
50
-    }
51
-    if (!empty($newsgroups)) {
52
-        $address .= 'newsgroups='.rawurlencode($newsgroups).'&';
53
-    }
54
-    if (!empty($followupto)) {
55
-        $address .= 'followupto='.rawurlencode($followupto).'&';
56
-    }
57
-
58
-    $address = rtrim($address, '?&');
59
-
60
-    // output
61
-    switch ($encode) {
62
-
63
-    case 'none':
64
-    case null:
65
-        return '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
66
-
67
-    case 'js':
68
-    case 'javascript':
69
-        $str = 'document.write(\'<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>\');';
70
-        $len = strlen($str);
71
-
72
-        $out = '';
73
-        for ($i = 0; $i < $len; ++$i) {
74
-            $out .= '%'.bin2hex($str[$i]);
75
-        }
76
-
77
-        return '<script type="text/javascript">eval(unescape(\''.$out.'\'));</script>';
78
-
79
-        break;
80
-    case 'javascript_charcode':
81
-    case 'js_charcode':
82
-    case 'jscharcode':
83
-    case 'jschar':
84
-        $str = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
85
-        $len = strlen($str);
86
-
87
-        $out = '<script type="text/javascript">'."\n<!--\ndocument.write(String.fromCharCode(";
88
-        for ($i = 0; $i < $len; ++$i) {
89
-            $out .= ord($str[$i]).',';
90
-        }
91
-
92
-        return rtrim($out, ',')."));\n-->\n</script>\n";
93
-
94
-        break;
95
-
96
-    case 'hex':
97
-        if (strpos($address, '?') !== false) {
98
-            $dwoo->triggerError('Mailto: Hex encoding is not possible with extra attributes, use one of : <em>js, jscharcode or none</em>.', E_USER_WARNING);
99
-        }
100
-
101
-        $out = '<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;';
102
-        $len = strlen($address);
103
-        for ($i = 0; $i < $len; ++$i) {
104
-            if (preg_match('#\w#', $address[$i])) {
105
-                $out .= '%'.bin2hex($address[$i]);
106
-            } else {
107
-                $out .= $address[$i];
108
-            }
109
-        }
110
-        $out .= '" '.$extra.'>';
111
-        $len = strlen($text);
112
-        for ($i = 0; $i < $len; ++$i) {
113
-            $out .= '&#x'.bin2hex($text[$i]);
114
-        }
115
-
116
-        return $out.'</a>';
117
-
118
-    default:
119
-        $dwoo->triggerError('Mailto: <em>encode</em> argument is invalid, it must be one of : <em>none (= no value), js, js_charcode or hex</em>', E_USER_WARNING);
120
-
121
-    }
32
+	if (empty($address)) {
33
+		return '';
34
+	}
35
+	if (empty($text)) {
36
+		$text = $address;
37
+	}
38
+
39
+	// build address string
40
+	$address .= '?';
41
+
42
+	if (!empty($subject)) {
43
+		$address .= 'subject='.rawurlencode($subject).'&';
44
+	}
45
+	if (!empty($cc)) {
46
+		$address .= 'cc='.rawurlencode($cc).'&';
47
+	}
48
+	if (!empty($bcc)) {
49
+		$address .= 'bcc='.rawurlencode($bcc).'&';
50
+	}
51
+	if (!empty($newsgroups)) {
52
+		$address .= 'newsgroups='.rawurlencode($newsgroups).'&';
53
+	}
54
+	if (!empty($followupto)) {
55
+		$address .= 'followupto='.rawurlencode($followupto).'&';
56
+	}
57
+
58
+	$address = rtrim($address, '?&');
59
+
60
+	// output
61
+	switch ($encode) {
62
+
63
+	case 'none':
64
+	case null:
65
+		return '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
66
+
67
+	case 'js':
68
+	case 'javascript':
69
+		$str = 'document.write(\'<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>\');';
70
+		$len = strlen($str);
71
+
72
+		$out = '';
73
+		for ($i = 0; $i < $len; ++$i) {
74
+			$out .= '%'.bin2hex($str[$i]);
75
+		}
76
+
77
+		return '<script type="text/javascript">eval(unescape(\''.$out.'\'));</script>';
78
+
79
+		break;
80
+	case 'javascript_charcode':
81
+	case 'js_charcode':
82
+	case 'jscharcode':
83
+	case 'jschar':
84
+		$str = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
85
+		$len = strlen($str);
86
+
87
+		$out = '<script type="text/javascript">'."\n<!--\ndocument.write(String.fromCharCode(";
88
+		for ($i = 0; $i < $len; ++$i) {
89
+			$out .= ord($str[$i]).',';
90
+		}
91
+
92
+		return rtrim($out, ',')."));\n-->\n</script>\n";
93
+
94
+		break;
95
+
96
+	case 'hex':
97
+		if (strpos($address, '?') !== false) {
98
+			$dwoo->triggerError('Mailto: Hex encoding is not possible with extra attributes, use one of : <em>js, jscharcode or none</em>.', E_USER_WARNING);
99
+		}
100
+
101
+		$out = '<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;';
102
+		$len = strlen($address);
103
+		for ($i = 0; $i < $len; ++$i) {
104
+			if (preg_match('#\w#', $address[$i])) {
105
+				$out .= '%'.bin2hex($address[$i]);
106
+			} else {
107
+				$out .= $address[$i];
108
+			}
109
+		}
110
+		$out .= '" '.$extra.'>';
111
+		$len = strlen($text);
112
+		for ($i = 0; $i < $len; ++$i) {
113
+			$out .= '&#x'.bin2hex($text[$i]);
114
+		}
115
+
116
+		return $out.'</a>';
117
+
118
+	default:
119
+		$dwoo->triggerError('Mailto: <em>encode</em> argument is invalid, it must be one of : <em>none (= no value), js, js_charcode or hex</em>', E_USER_WARNING);
120
+
121
+	}
122 122
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/truncate.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -25,25 +25,25 @@
 block discarded – undo
25 25
  */
26 26
 function Dwoo_Plugin_truncate(Dwoo_Core $dwoo, $value, $length = 80, $etc = '...', $break = false, $middle = false)
27 27
 {
28
-    if ($length == 0) {
29
-        return '';
30
-    }
28
+	if ($length == 0) {
29
+		return '';
30
+	}
31 31
 
32
-    $value = (string) $value;
33
-    $etc = (string) $etc;
34
-    $length = (int) $length;
32
+	$value = (string) $value;
33
+	$etc = (string) $etc;
34
+	$length = (int) $length;
35 35
 
36
-    if (strlen($value) < $length) {
37
-        return $value;
38
-    }
36
+	if (strlen($value) < $length) {
37
+		return $value;
38
+	}
39 39
 
40
-    $length = max($length - strlen($etc), 0);
41
-    if ($break === false && $middle === false) {
42
-        $value = preg_replace('#\s+(\S*)?$#', '', substr($value, 0, $length + 1));
43
-    }
44
-    if ($middle === false) {
45
-        return substr($value, 0, $length).$etc;
46
-    }
40
+	$length = max($length - strlen($etc), 0);
41
+	if ($break === false && $middle === false) {
42
+		$value = preg_replace('#\s+(\S*)?$#', '', substr($value, 0, $length + 1));
43
+	}
44
+	if ($middle === false) {
45
+		return substr($value, 0, $length).$etc;
46
+	}
47 47
 
48
-    return substr($value, 0, ceil($length / 2)).$etc.substr($value, -floor($length / 2));
48
+	return substr($value, 0, ceil($length / 2)).$etc.substr($value, -floor($length / 2));
49 49
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@
 block discarded – undo
37 37
         return $value;
38 38
     }
39 39
 
40
-    $length = max($length - strlen($etc), 0);
40
+    $length = max($length-strlen($etc), 0);
41 41
     if ($break === false && $middle === false) {
42
-        $value = preg_replace('#\s+(\S*)?$#', '', substr($value, 0, $length + 1));
42
+        $value = preg_replace('#\s+(\S*)?$#', '', substr($value, 0, $length+1));
43 43
     }
44 44
     if ($middle === false) {
45 45
         return substr($value, 0, $length).$etc;
46 46
     }
47 47
 
48
-    return substr($value, 0, ceil($length / 2)).$etc.substr($value, -floor($length / 2));
48
+    return substr($value, 0, ceil($length/2)).$etc.substr($value, -floor($length/2));
49 49
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/spacify.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,5 +22,5 @@
 block discarded – undo
22 22
  */
23 23
 function Dwoo_Plugin_spacify_compile(Dwoo_Compiler $compiler, $value, $space_char = ' ')
24 24
 {
25
-    return 'implode('.$space_char.', str_split('.$value.', 1))';
25
+	return 'implode('.$space_char.', str_split('.$value.', 1))';
26 26
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/optional.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,5 +22,5 @@
 block discarded – undo
22 22
  */
23 23
 function Dwoo_Plugin_optional_compile(Dwoo_Compiler $compiler, $value)
24 24
 {
25
-    return $value;
25
+	return $value;
26 26
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/replace.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
  */
24 24
 function Dwoo_Plugin_replace_compile(Dwoo_Compiler $compiler, $value, $search, $replace, $case_sensitive = true)
25 25
 {
26
-    if ($case_sensitive == 'false' || (bool) $case_sensitive === false) {
27
-        return 'str_ireplace('.$search.', '.$replace.', '.$value.')';
28
-    } else {
29
-        return 'str_replace('.$search.', '.$replace.', '.$value.')';
30
-    }
26
+	if ($case_sensitive == 'false' || (bool) $case_sensitive === false) {
27
+		return 'str_ireplace('.$search.', '.$replace.', '.$value.')';
28
+	} else {
29
+		return 'str_replace('.$search.', '.$replace.', '.$value.')';
30
+	}
31 31
 }
Please login to merge, or discard this patch.