X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FConsole%2FFixAPDeliveryWorkerTaskParameters.php;h=d2357c318d0d47c4f15de1aaecee165bbbce2e92;hb=e659a0314086dd700dbe5e754e383ab758725805;hp=a8ad3b1f7b8be480a54645969c8563adb8169ee6;hpb=054c301ef0345c4ff9f35cfd08717757eab17b9d;p=friendica.git diff --git a/src/Console/FixAPDeliveryWorkerTaskParameters.php b/src/Console/FixAPDeliveryWorkerTaskParameters.php index a8ad3b1f7b..d2357c318d 100644 --- a/src/Console/FixAPDeliveryWorkerTaskParameters.php +++ b/src/Console/FixAPDeliveryWorkerTaskParameters.php @@ -1,6 +1,6 @@ l10n = $l10n; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); @@ -106,7 +106,7 @@ HELP; $this->errored = 0; do { - $result = $this->dba->p('SELECT `id`, `parameter` FROM `workerqueue` WHERE `command` = "APDelivery" AND `parameter` LIKE "[\"%\",\"\",%" LIMIT ' . $this->examined . ', 100'); + $result = $this->dba->select('workerqueue', ['id', 'parameter'], ["`command` = ? AND `parameter` LIKE ?", "APDelivery", "[\"%\",\"\",%"], ['limit' => [$this->examined, 100]]); while ($row = $this->dba->fetch($result)) { $this->examined++; $this->processRow($row); @@ -129,7 +129,7 @@ HELP; if (!$parameters) { $this->errored++; if ($this->getOption('v')) { - $this->out('Unabled to parse parameter JSON of the row with id ' . $workerqueueItem['id']); + $this->out('Unable to parse parameter JSON of the row with id ' . $workerqueueItem['id']); $this->out('JSON: ' . var_export($workerqueueItem['parameter'], true)); } } @@ -155,7 +155,7 @@ HELP; } else { $this->errored++; if ($this->getOption('v')) { - $this->out('Unabled to update the row with id ' . $workerqueueItem['id']); + $this->out('Unable to update the row with id ' . $workerqueueItem['id']); $this->out('Fields: ' . var_export($fields, true)); } }