Skip to content

fix call Non-static method statically #2788

Merged
limingxinleo merged 5 commits intohyperf:masterfrom
bytehello:master
Nov 10, 2020
Merged

fix call Non-static method statically #2788
limingxinleo merged 5 commits intohyperf:masterfrom
bytehello:master

Conversation

@bytehello
Copy link
Copy Markdown
Contributor

In Hyperf\Di\Aop\PropertyHandlerVisitor method leaveNode modify __construct method,

outout code in runtime/container/proxy/*.proxy.php like below:

use \Hyperf\Di\Aop\PropertyHandlerTrait;
function __construct()
    {
        self::__handlePropertyHandler(__CLASS__);
    }

but in \Hyperf\Di\Aop\PropertyHandlerTrait, __handlePropertyHandler is NON-STATIC method

trait PropertyHandlerTrait
{
    protected function __handlePropertyHandler(string $className)
    {
       ...

Non-static method self::__handlePropertyHandler should not be called statically

fix call Non-static method (__handlePropertyHandler) statically
@limingxinleo
Copy link
Copy Markdown
Member

what's your php version.

@limingxinleo limingxinleo added the good first issue Good for newcomers label Nov 10, 2020
limingxinleo
limingxinleo previously approved these changes Nov 10, 2020
limingxinleo
limingxinleo previously approved these changes Nov 10, 2020
@limingxinleo limingxinleo merged commit 72fbb8f into hyperf:master Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants