You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The requirements for gas-orm say PHP >= 5.3, but it's not quite compatible with php7.
In libraries/gas.php the exception-handler expects the type "Exception", which throws an exception in php7, if an error in occurs in gas.php and the custom exception-handler is called.
A fix for php7 would be the exception-handler to expect the type "Throwable", which is implemented by "Exception" and "Error", but this wouldn't be backwards compatible to php5.
For compability to php5 and 7, you should remove the type declaration from the handler.
Result would be:
old: public function exception(Exception $e)
new: public function exception($e)
This should solve the problem according to php documentation.
The requirements for gas-orm say PHP >= 5.3, but it's not quite compatible with php7.
In libraries/gas.php the exception-handler expects the type "Exception", which throws an exception in php7, if an error in occurs in gas.php and the custom exception-handler is called.
A fix for php7 would be the exception-handler to expect the type "Throwable", which is implemented by "Exception" and "Error", but this wouldn't be backwards compatible to php5.
For compability to php5 and 7, you should remove the type declaration from the handler.
Result would be:
old:
public function exception(Exception $e)
new:
public function exception($e)
This should solve the problem according to php documentation.
Sources:
http://php.net/manual/de/migration70.incompatible.php
http://php.net/manual/en/class.throwable.php
Also, libraries/gas.php should be libraries/Gas.php so CodeIgniter actually can autoload it (at least on *nix, where stuff is case sensitive)
The text was updated successfully, but these errors were encountered: