Error installing extension (extension_directory)

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
WHK102
Registered User
Posts: 3
Joined: Wed Aug 15, 2018 8:40 pm

Error installing extension (extension_directory)

Post by WHK102 » Wed Aug 15, 2018 8:47 pm

When installin g an extension, phpbb3.2.2 says: Fatal error: Call to a member function extension_directory() on a non-object in /home/foo/public_html/phpbb/extension/base.php on line 131

base.php on line 131 says:

Code: Select all

// Only have the finder search in this extension path directory
    $migrations = $this->extension_finder
        ->extension_directory('/migrations')
        ...
The $this->extension_finder is null. I try test the file writing a echo for each function:

Code: Select all

    public function __construct(ContainerInterface $container, \phpbb\finder $extension_finder, \phpbb\db\migrator $migrator, $extension_name, $extension_path)
    {
        echo 0;
    ...
    public function is_enableable()
    {
    echo 1;
    ... etc.
The result is: 1125, never use the constructor, the $this->extension_finder is never defined.

What should happen is that phpbb indicates that there is an error in the extension but not that it throws a blank page or a core error of phpbb3. How can I know where the error is in the extension? It is a personalized extension ( https://github.com/WHK102/phpbb3-uploadimgbbc ).

WHK102
Registered User
Posts: 3
Joined: Wed Aug 15, 2018 8:40 pm

Re: Error installing extension (extension_directory)

Post by WHK102 » Wed Aug 15, 2018 9:16 pm

Solve the problem remove the __construct() from ext.php on custom extension. Please, add a validation for same errors.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: stevemaury and 42 guests