-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Replication code:
use opensrs\OMA\GetDomain;
$oma = GetDomain::call( array() );When we try to execute it, it will resulting error
PHP Fatal error: Uncaught Error: Class "opensrs\OMA\Exception" not foundThe issue is mainly how the Exception being initialized there:
| throw new Exception('oSRS Error - Domain required'); |
The issue is it tries to find Exception class in opensrs/OMA namespace, which is non exists.
I am not sure which Exception class to be intended use here, but
- If its intended to use opensrs Exception, then it needs
use opensrs\Exception;around here:
use opensrs\OMA; - OR if the php standard exception intended to be used then it needs to explicitly use backslash
throw new \Exception():
throw new Exception('oSRS Error - Domain required');
I don't think this is PHP version issue, but here's mine:
PHP 8.1.9 (cli) (built: Aug 15 2022 09:39:52) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.9, Copyright (c) Zend Technologies
with Zend OPcache v8.1.9, Copyright (c), by Zend TechnologiesMetadata
Metadata
Assignees
Labels
No labels