Propel icon indicating copy to clipboard operation
Propel copied to clipboard

`runtime/lib/util/BasePeer.php:500-503` gives warnings in PHP7.4

Open nicolasderouet opened this issue 5 years ago • 1 comments

PHP Deprecated: Array and string offset access syntax with curly braces is deprecated

Fix: runtime/lib/util/BasePeer.php line 399 to 405 From:

for ($r = 0, $len = strlen($raw); $r < $len; $r++) {
  if ($raw{$r} == '?') {
    $rawcvt .= ':p' . $p++;
  } else {
    $rawcvt .= $raw{$r};
  }
}

To:

for ($r = 0, $len = strlen($raw); $r < $len; $r++) {
  if ($raw[$r] == '?') {
    $rawcvt .= ':p' . $p++;
  } else {
    $rawcvt .= $raw[$r];
  }
}

nicolasderouet avatar May 25 '20 11:05 nicolasderouet

see also https://github.com/propelorm/Propel/pull/1082

DavidGoodwin avatar May 25 '20 14:05 DavidGoodwin