Why am I getting Fatal error when calling a parent's constructor?

后端 未结 5 2227
执念已碎
执念已碎 2021-02-11 17:07

I am extending one of the SPL (Standard PHP Library) classes and I am unable to call the parent\'s constructor. Here is the error I am getting:

Fatal erro

5条回答
  •  不思量自难忘°
    2021-02-11 18:02

    This error gets thrown, usually, when the parent class being referenced in parent::__construct() actually has no __construct() function.

提交回复
热议问题