• Nothing too major, but these are present even after the latest update:

    PHP Notice:  Undefined index: ticket_status in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 14
    PHP Notice:  Undefined index: custom_status_ in /path/to/wp-content/plugins/supportcandy/includes/class-wpsc-functions.php on line 692
    PHP Notice:  Undefined index: ticket_category in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 17
    PHP Notice:  Undefined index: custom_category_ in /path/to/wp-content/plugins/supportcandy/includes/class-wpsc-functions.php on line 698
    PHP Notice:  Undefined index: ticket_priority in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 20
    PHP Notice:  Undefined index: custom_priority_ in /path/to/wp-content/plugins/supportcandy/includes/class-wpsc-functions.php on line 704
    PHP Notice:  Undefined index: customer_name in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 23
    PHP Notice:  Undefined index: customer_email in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 26
    PHP Notice:  Undefined index: ticket_subject in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 29
    PHP Notice:  Undefined index: date_created in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 92
    PHP Notice:  Undefined index: date_created in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 92
    PHP Notice:  Undefined index: date_updated in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 95
    PHP Notice:  Undefined index: agent_created in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 98
    PHP Notice:  Undefined index: ticket_auth_code in /path/to/wp-content/plugins/supportcandy/includes/functions/replace_macro.php on line 123
    
    PHP Notice:  Array to string conversion in /path/to/wp-content/plugins/wpsc-woocommerce/includes/admin/print_custom_form_field.php on line 31
    PHP Notice:  Array to string conversion in /path/to/wp-content/plugins/wpsc-woocommerce/includes/admin/print_custom_form_field.php on line 84
    
    PHP Notice:  Trying to get property 'term_id' of non-object in /path/to/wp-content/plugins/supportcandy/includes/functions/check_ticket_conditions.php on line 30
    PHP Notice:  Trying to get property 'slug' of non-object in /path/to/wp-content/plugins/supportcandy/includes/functions/check_ticket_conditions.php on line 34

    =>

    $ticket_status = isset( $wpsc_ticket_data['ticket_status'] ) ? $wpsc_ticket_data['ticket_status'] : '';
    $str = preg_replace('/{ticket_status}/', $this->get_status_name($ticket_status), $str);
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Nikhil G

    (@nsgawli)

    Hello @sarmatopia

    Thank you for reporting this. We have added it to our bug fix queue. It will be fixed in the next version of the product.

    Thread Starter sarmatopia

    (@sarmatopia)

    I suggest maybe using wp_parse_args() on $wpsc_ticket_data/get_ticket and the other arrays used, probably within the functions before they’re returned.

    That replace_macro.php file should just be part of the class-wpsc-functions.php rather than included. It makes it difficult to read the code to fix it.

    I’m not sure what $ticket_data = json_decode(json_encode($ticket), true); is helping to do, i.e. if it were removed, would the array have default empty values? (I’m not sure).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Notices’ is closed to new replies.