Skip to content

Commit

Permalink
fix: PHP 8.1 mb_stripos() deprecated
Browse files Browse the repository at this point in the history
method quoteValue() in framework/db/Schema.php

``mb_stripos(): Passing null to parameter yiisoft#1 ($haystack) of type string is deprecated``
  • Loading branch information
aldok10 committed Nov 30, 2022
1 parent fe46b59 commit 1394959
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/db/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public function quoteValue($str)
return $str;
}

if (mb_stripos($this->db->dsn, 'odbc:') === false && ($value = $this->db->getSlavePdo()->quote($str)) !== false) {
if (mb_stripos((string)$this->db->dsn, 'odbc:') === false && ($value = $this->db->getSlavePdo()->quote($str)) !== false) {
return $value;
}

Expand Down

0 comments on commit 1394959

Please sign in to comment.