Near fix for PHP errors when trying to use test_mode attribute