forked from extern/egroupware
fix at PHP 7.0 not working migrating vfs from db to filesystem (filemanager/cli.php migrate-db2fs)
migration loops forever, after migrating all files, as it does not detect no more files to migrate
This commit is contained in:
parent
4b379776b3
commit
69456307e4
@ -44,8 +44,9 @@ class Utils extends StreamWrapper
|
||||
$stmt->bindColumn(4,$fs_content,\PDO::PARAM_LOB);
|
||||
$stmt->bindValue(':offset', $n, \PDO::PARAM_INT);
|
||||
|
||||
while ($stmt->execute())
|
||||
while ($stmt->execute()) // && $stmt->rowCount() does not work for all dbs :(
|
||||
{
|
||||
$start = $n;
|
||||
foreach($stmt as $row)
|
||||
{
|
||||
// hack to work around a current php bug (http://bugs.php.net/bug.php?id=40913)
|
||||
@ -84,7 +85,7 @@ class Utils extends StreamWrapper
|
||||
|
||||
++$n;
|
||||
}
|
||||
if (!$n) break; // just in case nothing is found, statement will execute just fine
|
||||
if (!$n || $n == $start) break; // just in case nothing is found, statement will execute just fine
|
||||
|
||||
$stmt->bindValue(':offset', $n, \PDO::PARAM_INT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user