Using array_push in method in php

前端 未结 5 1735
抹茶落季
抹茶落季 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:32

    You've missed to the call the parent constructor in the child's constructor

    class ExtendedEmailer extends emailer
    {
        function  __construct(){
            //overwriting __contruct here
            parent::__construct('dummy_sender@sender.com');
        }
    }
    

    should fix this issue.

提交回复
热议问题