Skip to content

Conversation

@acrobertson
Copy link
Contributor

Fixes #1049

Approach

This adds a magic __isset() method to the Cloudinary\Relate\Relationship class to complement the existing __get() and __set() methods.

Without this, calling isset() on an overloaded property like public_id returns false, even when it is in fact set.

QA notes

Following the reproduction steps in the linked issue, calling isset() on an overloaded property of a Relationship instance should now return true if it has a value in the $data_cache.

Without this, calling `isset()` on an overloaded property accessed via
the magic `__get()` method, like `public_id` returns `false`, even if
it is set.
@acrobertson acrobertson changed the title Add isset() method to Relationship class Add __isset() method to Relationship class May 29, 2025
@aatanasovdev
Copy link
Contributor

@acrobertson, Thank you for your contribution and for preparing a PR for the submitted issue.

The code changes look good.

@aatanasov-cloudinary aatanasov-cloudinary merged commit d5f702e into cloudinary:develop Jun 5, 2025
3 checks passed
@acrobertson acrobertson deleted the fix/relationship-isset branch June 17, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants