Skip to content

Commit

Permalink
fix ReflectionType::__toString() being deprecated in PHP 7.4 (fixes #43
Browse files Browse the repository at this point in the history
  • Loading branch information
mbolli committed Apr 29, 2020
1 parent 3aa3a5a commit d4ed20e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/api/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function __construct() {
}

// make sure the data types are correct
switch ($arg->getType()) {
switch ($arg->getType()->getName()) {
case 'int':
if (!is_numeric($_REQUEST[$arg->name])) $this->error(400, 'Expected type int for ' . $arg->name);
$args[$arg->name] = intval($_REQUEST[$arg->name]);
Expand Down

0 comments on commit d4ed20e

Please sign in to comment.