Open
Description
I got an error not 100% sure it's a PHP compat issue but it does look like it
Details
Type: Error
Code: 0
Message: Using $this when not in object context
File: ..../vendor/propel/propel/src/Propel/Runtime/ActiveQuery/ModelCriteria.php
Line: 1497
Trace
#0 ..../src/Models/Environment/Base/EnvironmentToServerQuery.php(700): Propel\Runtime\ActiveQuery\ModelCriteria::delete()
After some dive into the code I came across this issue:
It generates a static reference ModelCriteria::delete
and inside this ref there is a test on if (0 === count($this->getMap())) {
which refers to $this.
Generated code from a Base Query file:
return $con->transaction(static function () use ($con, $criteria) {
$affectedRows = 0; // initialize var to track total num of affected rows
EnvironmentToServerTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);
EnvironmentToServerTableMap::clearRelatedInstancePool();
return $affectedRows;
});