Skip to content

Commit 2533619

Browse files
authored
Fix query to purge old installed extras (#16717)
### What does it do? Fix incorrect DATETIME value: '0000-00-00 00:00:00' error in the query ### Why is it needed? The generated query is wrong for MySQL installations that have NO_ZERO_DATE/NO_ZERO_IN_DATE activated. ### Related issue(s)/PR(s) MODX 3.x port of #16716
1 parent 4a7130c commit 2533619

File tree

1 file changed

+1
-1
lines changed
  • core/src/Revolution/Processors/Workspace/Packages

1 file changed

+1
-1
lines changed

Diff for: core/src/Revolution/Processors/Workspace/Packages/Purge.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function process()
9696
$c = $this->modx->newQuery(modTransportPackage::class, [
9797
'package_name' => $package->get('package_name'),
9898
]);
99-
$c->where(['installed:!=' => '0000-00-00 00:00:00']);
99+
$c->where(['installed:IS NOT' => null]);
100100
$c->sortby('installed', 'desc');
101101
$c->limit(1000, 1);
102102
$purgedPackages = $this->modx->getIterator(modTransportPackage::class, $c);

0 commit comments

Comments
 (0)