AbstractPlatform::_getTransactionIsolationLevelSQL() must return a string

parent e5068b42
...@@ -1293,13 +1293,13 @@ SQL ...@@ -1293,13 +1293,13 @@ SQL
{ {
switch ($level) { switch ($level) {
case TransactionIsolationLevel::READ_UNCOMMITTED: case TransactionIsolationLevel::READ_UNCOMMITTED:
return 0; return '0';
case TransactionIsolationLevel::READ_COMMITTED: case TransactionIsolationLevel::READ_COMMITTED:
return 1; return '1';
case TransactionIsolationLevel::REPEATABLE_READ: case TransactionIsolationLevel::REPEATABLE_READ:
return 2; return '2';
case TransactionIsolationLevel::SERIALIZABLE: case TransactionIsolationLevel::SERIALIZABLE:
return 3; return '3';
default: default:
throw new InvalidArgumentException('Invalid isolation level:' . $level); throw new InvalidArgumentException('Invalid isolation level:' . $level);
} }
......
...@@ -168,11 +168,11 @@ class SqlitePlatform extends AbstractPlatform ...@@ -168,11 +168,11 @@ class SqlitePlatform extends AbstractPlatform
{ {
switch ($level) { switch ($level) {
case TransactionIsolationLevel::READ_UNCOMMITTED: case TransactionIsolationLevel::READ_UNCOMMITTED:
return 0; return '0';
case TransactionIsolationLevel::READ_COMMITTED: case TransactionIsolationLevel::READ_COMMITTED:
case TransactionIsolationLevel::REPEATABLE_READ: case TransactionIsolationLevel::REPEATABLE_READ:
case TransactionIsolationLevel::SERIALIZABLE: case TransactionIsolationLevel::SERIALIZABLE:
return 1; return '1';
default: default:
return parent::_getTransactionIsolationLevelSQL($level); return parent::_getTransactionIsolationLevelSQL($level);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment