Skip to content

Commit 30cc1c9

Browse files
committed
get/set methods updated
1 parent 6a4f4fa commit 30cc1c9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

JotForm.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ public function __construct($apiKey="", $outputType="json", $debugMode=false){
2424
}
2525

2626
public function __get($prop) {
27-
return $this->$prop;
27+
if (property_exists($this, $property)) {
28+
return $this->$property;
29+
}
2830
}
2931

3032
public function __set($prop, $value) {
31-
$this->$prop = $value;
33+
if (property_exists($this, $property)) {
34+
$this->$property = $value;
35+
}
3236
}
3337

3438
private function _debugLog($str){

0 commit comments

Comments
 (0)