Skip to content

Commit

Permalink
fix deprecations in generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
jwong-dayspring committed May 21, 2024
1 parent 292f314 commit fc22e3b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion generator/lib/behavior/sluggable/SluggableBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ protected static function cleanupSlugPart(\$slug, \$replacement = '" . $this->ge
{
// transliterate
if (function_exists('iconv')) {
\$slug = iconv('utf-8', 'us-ascii//TRANSLIT', \$slug);
\$slug = iconv('utf-8', 'us-ascii//TRANSLIT', (string)\$slug);
}
// lowercase
Expand Down
2 changes: 1 addition & 1 deletion generator/lib/builder/om/PHP5NestedSetBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ protected function addGetIterator(&$script)
*
* @return NodeIterator
*/
public function getIterator()
public function getIterator(): Iterator
{
return new NestedSetRecursiveIterator(\$this);
}
Expand Down
2 changes: 1 addition & 1 deletion generator/lib/builder/om/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ public function filterBy$colPhpName(\$$variableName = null, \$comparison = null)
if (null === \$comparison) {
if (is_array(\$$variableName)) {
\$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', \$$variableName)) {
} elseif (preg_match('/[\%\*]/', (string)\$$variableName)) {
\$$variableName = str_replace('*', '%', \$$variableName);
\$comparison = Criteria::LIKE;
}
Expand Down

0 comments on commit fc22e3b

Please sign in to comment.