If daemon or args are unset the preg_replace is never called which can result in count not having a value when referenced in the if statement. This generates a warning in error.log.