fixed E_NOTICE error in CustomView.php