Advertisement:

Author Topic: SOLVED Undefined index NOTICE from email_new_admin  (Read 344 times)

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
SOLVED Undefined index NOTICE from email_new_admin
« on: April 08, 2018, 12:12:00 am »
[31-Mar-2018 09:53:07 ] PHP Notice:  Undefined index: {ADMIN_NAME} in /oc-includes/osclass/classes/EmailVariables.php on line 317
[31-Mar-2018 09:53:07 ] PHP Notice:  Undefined index: {USERNAME} in /oc-includes/osclass/classes/EmailVariables.php on line 317
[31-Mar-2018 09:53:07 ] PHP Notice:  Undefined index: {PASSWORD} in /oc-includes/osclass/classes/EmailVariables.php on line 317
[31-Mar-2018 09:53:07 ] PHP Notice:  Undefined index: {WEB_ADMIN_LINK} in /oc-includes/osclass/classes/EmailVariables.php on line 317

Code: [Select]
                ),'email_new_admin' => array(
                    '{ADMIN_NAME}',
                    '{USERNAME}',
                    '{PASSWORD}',
                    '{WEB_ADMIN_LINK}'
......

            if(isset($email['s_internal_name']) && isset($variables[$email['s_internal_name']])) {
                foreach($variables[$email['s_internal_name']] as $word) {
317:                    $array[$word] = $this->variables[$word];
                }
            }

I did not modify this part nor created a new admin and in admin list there are no new admins.

So...why did this code ran for email_new_admin?

In db's log table there is no record from 31.03.2018

« Last Edit: April 08, 2018, 01:40:35 am by marius-ciclistu »

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Undefined index NOTICE from email_new_admin
« Reply #1 on: April 08, 2018, 12:36:12 am »
SOLVED

Code: [Select]
                '{ADMIN_NAME}'        => __('Admin name'),
                '{USERNAME}'          => __('User name'),
                '{PASSWORD}'          => __('Password'),
                '{WEB_ADMIN_LINK}'    => __('Web admin link')
This code needs to be aded to

        /**
         *  Initialize menu representation.
         */
        public function init()
        {
            $this->variables = array(

in
/oc-includes/osclass/classes/EmailVariables.php


So this is a core bug.