I think it would be better to have an
if ( count( $array ) > 0 ) {
     $success = true;
}