Undefined variable Problem

Description:

With PHP 7.1, following notice happens from time to time:

Solution:

Reference: