CESNET / pakiti-server

Pakiti provides a monitoring mechanism to check the patching status of Linux systems.
BSD 2-Clause "Simplified" License
49 stars 35 forks source link

deleteUnusedPackages.php typo breaks the script #172

Closed bluikko closed 4 years ago

bluikko commented 4 years ago

Running cli/deleteUnusedPackages.php does not work because of a typo in the loop; the wrong variable is used which results in no unused packages being deleted.

A message is printed that says packages were deleted but it is wrong:

Number of deleted packages: 1999

The problem is clear from the error message that is printed every iteration:

PHP Notice:  Undefined variable: pkgId in /var/www/pakiti3/src/modules/cli/deleteUnusedPackages.php on line 8