Skip to content

Instantly share code, notes, and snippets.

@speedmax
Created March 10, 2009 04:56
Show Gist options
  • Save speedmax/76743 to your computer and use it in GitHub Desktop.
Save speedmax/76743 to your computer and use it in GitHub Desktop.
<?php
/**
* Patch isset($model->attr) problem for this
* php library http://lukebaker.org/projects/activerecord-in-php/
*/
class ActiveRecord {
function __isset($attr) {
try {
$value = $this->$attr;
} catch (ActiveRecordException $e) {
return false;
}
return true;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment