<h4>Pet Registry — Full CRUD Endpoint Fixes</h4><ul><li><strong>Fixed:</strong> getSortedPet/getSortedPets — null $mychosenpet crash and undefined petType key. Added null guard on get_my_chosen_pet_type result, added empty($ids) early return, and used null coalescing for $p["petType"].</li><li><strong>Fixed:</strong> getAllPet — scandir on non-existent directory in delete_unused_image(). Added is_dir() check before scandir. Also guarded $ids null and cast uid to int.</li><li><strong>Fixed:</strong> mygetBreedJson/mygetCategoryJson — undefined $_POST["id"]. Added ?? null fallback.</li><li><strong>Fixed:</strong> searchPet — undefined $search variable after extract. Added ?? "" fallback.</li><li><strong>Fixed:</strong> addCategory — undefined keys status, category_val, category_desc. Added ?? "" for all optional POST params.</li><li><strong>Fixed:</strong> addbreed — undefined keys breed, typefk, chkbx. Added ?? "" for all. Fixed $domainsite_params by adding global declaration at controller top.</li><li><strong>Fixed:</strong> trim(null) deprecation in getRegistryTypesRecord. Added ?? "".</li></ul><p>All 19 endpoints now pass with 0 errors.</p>