gadgetto / GoodNews

An integrated group and newsletter mailing system for MODX Revolution CMF
GNU General Public License v2.0
10 stars 4 forks source link

PHP warning in _removeLockFile method of goodnewsprocesshandler class #38

Closed gadgetto closed 9 years ago

gadgetto commented 9 years ago

/core/components/goodnews/model/goodnews/goodnewsprocesshandler.class.php : 407) PHP warning: Invalid argument supplied for foreach()

Since glob() may not reliably return an empty array for an empty match we need to check if is_array first:

$files = glob($tmpFolder . $fileTypes);
if (is_array($files) && count($files) > 0) {
    foreach($files as $Filename) {
    ...
gadgetto commented 9 years ago

Currently can't replicate