Skip to content

Commit 2c7a2f7

Browse files
author
Dmytro Dymarchuk
authored
Fixed php 8.1 compatibility (#1857)
1 parent 428eccd commit 2c7a2f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Propel/Generator/Model/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ public function addExtraIndices(): void
411411
// MySQL needs indices on any columns that serve as foreign keys.
412412
// These are not auto-created prior to 4.1.2.
413413

414-
$name = substr_replace($foreignKey->getName(), 'fi_', strrpos($foreignKey->getName(), 'fk_'), 3);
414+
$name = substr_replace($foreignKey->getName(), 'fi_', (int)strrpos($foreignKey->getName(), 'fk_'), 3);
415415
if ($this->hasIndex($name)) {
416416
// if we already have an index with this name, then it looks like the columns of this index have just
417417
// been changed, so remove it and inject it again. This is the case if a referenced table is handled

0 commit comments

Comments
 (0)