Skip to content

PHP Fatal error: Uncaught Error: Class "opensrs\OMA\Exception" not found #56

@pentatonicfunk

Description

@pentatonicfunk

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 found

The 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

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 Technologies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions