[MC-99]: Prevent PHP Warning to happen.

Backport from master to 1.1