Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 38d89d8

Browse files
committed
Fixed strpos: ending parentheses is in incorrect location
Fixed the current implementation of strpos, it currently looked like this `strpos($to_escape, "'" != false))` incorrectly passes `"'" != false` as the second argument. Changed it to `if (strpos($to_escape, '"') !== false && strpos($to_escape, "'") !== false) {`
1 parent 44feb1a commit 38d89d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/WebDriverSelect.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public function deselectByVisibleText($text) {
259259
* @return string The escaped string.
260260
*/
261261
protected function escapeQuotes($to_escape) {
262-
if (strpos($to_escape, '"') !== false && strpos($to_escape, "'" != false)) {
262+
if (strpos($to_escape, '"') !== false && strpos($to_escape, "'") !== false) {
263263
$substrings = explode('"', $to_escape);
264264

265265
$escaped = "concat(";
@@ -274,7 +274,7 @@ protected function escapeQuotes($to_escape) {
274274
return $escaped;
275275
}
276276

277-
if (strpos($to_escape, '"' !== false)) {
277+
if (strpos($to_escape, '"') !== false) {
278278
return sprintf("'%s'", $to_escape);
279279
}
280280

0 commit comments

Comments
 (0)