Skip to content

Commit 07e2746

Browse files
committed
Fix strpos usage deprecation warning : 2
1 parent de0a7d1 commit 07e2746

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Ajax/common/html/traits/BaseHtmlPropertiesTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function removeProperty($name) {
103103

104104
public function propertyContains($propertyName, $value) {
105105
$values=$this->_self->getProperty($propertyName);
106-
if (isset($values)) {
106+
if (isset($values) && $value!=null) {
107107
return JString::contains($values, $value);
108108
}
109109
return false;

Ajax/service/JString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class JString {
44

55
public static function contains($hay,$needle){
6-
return strpos("$hay", $needle) !== false;
6+
return strpos($hay, "$needle") !== false;
77
}
88
public static function startswith($hay, $needle) {
99
return substr($hay, 0, strlen($needle)) === $needle;

0 commit comments

Comments
 (0)