daa1703d by Marty Penner

Remove some notices/warnings. refs #1650

1 parent cac6a132
...@@ -39,6 +39,18 @@ class HierarchicalMenu implements Countable, Iterator { ...@@ -39,6 +39,18 @@ class HierarchicalMenu implements Countable, Iterator {
39 39
40 $last_id = $item->ID; 40 $last_id = $item->ID;
41 } elseif ($item->menu_item_parent == $last_id) { 41 } elseif ($item->menu_item_parent == $last_id) {
42 if (!property_exists($this, 'contents')) {
43 $this->contents = array();
44 }
45
46 if (!isset($this->contents[$this->id_lookup[$last_id]])) {
47 $this->contents[$this->id_lookup[$last_id]] = new \StdClass;
48 }
49
50 if (!property_exists($this->contents[$this->id_lookup[$last_id]], '_children')) {
51 $this->contents[$this->id_lookup[$last_id]]->_children = null;
52 }
53
42 $this->contents[$this->id_lookup[$last_id]]->_children = true; 54 $this->contents[$this->id_lookup[$last_id]]->_children = true;
43 $this->contents[$this->id_lookup[$last_id]]->classes[] = 'menu-item-children'; 55 $this->contents[$this->id_lookup[$last_id]]->classes[] = 'menu-item-children';
44 $nest[] = $last_id; 56 $nest[] = $last_id;
......
...@@ -201,7 +201,7 @@ function send_triggered_notification($uid = 0, $trigger = "NO_TRIGGER", $args = ...@@ -201,7 +201,7 @@ function send_triggered_notification($uid = 0, $trigger = "NO_TRIGGER", $args =
201 $notification->trigger = $details['trigger']; 201 $notification->trigger = $details['trigger'];
202 $notification->status = isset($details['status']) ? $details['status'] : "active"; 202 $notification->status = isset($details['status']) ? $details['status'] : "active";
203 $notification->type = $details['type']; 203 $notification->type = $details['type'];
204 $notification->sendto = $details['sendto']; 204 $notification->sendto = @$details['sendto'];
205 $notification->is_email = (($email['text'] != "" || $email['html'] != "") && $email['subject'] != "") ? true : false; 205 $notification->is_email = (($email['text'] != "" || $email['html'] != "") && $email['subject'] != "") ? true : false;
206 $notification->is_system = (isset($system['message']) && $system['message'] != "") ? true : false; 206 $notification->is_system = (isset($system['message']) && $system['message'] != "") ? true : false;
207 207
...@@ -255,7 +255,7 @@ function send_triggered_notification($uid = 0, $trigger = "NO_TRIGGER", $args = ...@@ -255,7 +255,7 @@ function send_triggered_notification($uid = 0, $trigger = "NO_TRIGGER", $args =
255 255
256 $from_email = get_bloginfo('admin_email'); 256 $from_email = get_bloginfo('admin_email');
257 $subject = strip_tags($contents['subject']); 257 $subject = strip_tags($contents['subject']);
258 $html = $contents['html']; 258 $html = @$contents['html'];
259 $alttext = strip_tags($contents['text']); 259 $alttext = strip_tags($contents['text']);
260 260
261 foreach ($args as $key => $val) { 261 foreach ($args as $key => $val) {
......