if $database->app_uuid is not set it would use '' in some conditions which isset would test true. This fix uses strlen instead, but also fixes number_transations app that highlighted the flaw