Using array_push in method in php

前端 未结 5 1726
抹茶落季
抹茶落季 2021-01-22 05:38

The addRecipients use push_array but it does not work. What am I doing wrong here??

In class.emailer.php

class Emailer
{
public $sender;
public $recipien         


        
5条回答
  •  后悔当初
    2021-01-22 06:39

    The problem is that you're overriding the Email class's constructor and never calling it (parent::__construct()). Either call the parent constructor in the ExtendedEmailer class constructor, or remove the constructor altogether from ExtendedEmailer if you're not actually using it (which in your sample code, you're not).

提交回复
热议问题