From cd9d3801efe9c82e632468f275d01572568c9695 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 13 Dec 2011 09:40:46 -0500
Subject: [PATCH] Fixed some PHP notices.

---
 interface/lib/classes/plugin.inc.php              |    2 +-
 interface/lib/classes/tform.inc.php               |   11 ++++++++++-
 interface/web/dashboard/dashboard.php             |    4 ++--
 remoting_client/examples/sites_web_domain_add.php |    4 ++--
 4 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/interface/lib/classes/plugin.inc.php b/interface/lib/classes/plugin.inc.php
index 910cc57..1cc9a06 100644
--- a/interface/lib/classes/plugin.inc.php
+++ b/interface/lib/classes/plugin.inc.php
@@ -136,7 +136,7 @@
 	 	global $app;
 
 	 	//* execute the functions for the events
-		if(is_array($_SESSION['s']['plugin_cache'][$event_name])) {
+		if(@is_array($_SESSION['s']['plugin_cache'][$event_name])) {
 			foreach($_SESSION['s']['plugin_cache'][$event_name] as $rec) {
 				$plugin_name = $rec['plugin'];
 				$function_name = $rec['function'];
diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index 324d5b8..5610162 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -364,7 +364,12 @@
                         $record = $this->decode($record,$tab);
                         if(is_array($record)) {
                                 foreach($this->formDef['tabs'][$tab]['fields'] as $key => $field) {
-                                        $val = $record[$key];
+								
+                                        if(isset($record[$key])) {
+											$val = $record[$key];
+										} else {
+											$val = '';
+										}
 
                                         // If Datasource is set, get the data from there
                                         if(isset($field['datasource']) && is_array($field['datasource'])) {
@@ -478,7 +483,11 @@
                                         break;
 
                                         default:
+											if(isset($record[$key])) {
                                                 $new_record[$key] = htmlspecialchars($record[$key]);
+											} else {
+												$new_record[$key] = '';
+											}
                                         }
                                 }
                         }
diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php
index 88d459f..c077881 100644
--- a/interface/web/dashboard/dashboard.php
+++ b/interface/web/dashboard/dashboard.php
@@ -100,14 +100,14 @@
 	$this_fullversion = (($this_version[0] < 10) ? '0'.$this_version[0] : $this_version[0]) .
 			    ((isset($this_version[1]) && $this_version[1] < 10) ? '0'.$this_version[1] : $this_version[1]) .
 			    ((isset($this_version[2]) && $this_version[2] < 10) ? '0'.$this_version[2] : $this_version[2]) .
-			    ((isset($this_version[3]) && $this_version[3] < 10) ? (($this_version[3] < 1) ? '00' : '0'.$this_version[3]) : $this_version[3]);
+			    ((isset($this_version[3]) && $this_version[3] < 10) ? (($this_version[3] < 1) ? '00' : '0'.$this_version[3]) : @$this_version[3]);
 
 
 	$new_version = explode(".",$v2);
 	$new_fullversion =  (($new_version[0] < 10) ? '0'.$new_version[0] : $new_version[0]) .
 			    ((isset($new_version[1]) && $new_version[1] < 10) ? '0'.$new_version[1] : $new_version[1]) .
 			    ((isset($new_version[2]) && $new_version[2] < 10) ? '0'.$new_version[2] : $new_version[2]) .
-			    ((isset($new_version[3]) && $new_version[3] < 10) ? (($new_version[3] < 1) ? '00' : '0'.$new_version[3]) : $new_version[3]);
+			    ((isset($new_version[3]) && $new_version[3] < 10) ? (($new_version[3] < 1) ? '00' : '0'.$new_version[3]) : @$new_version[3]);
 	if($new_fullversion > $this_fullversion) {
 		$info[] = array('info_msg' => 'There is a new Version of ISPConfig 3 available!<br>' . 
 			'This Version: ' . $v1 . '<br>' . 
diff --git a/remoting_client/examples/sites_web_domain_add.php b/remoting_client/examples/sites_web_domain_add.php
index 2905db0..9481cd3 100644
--- a/remoting_client/examples/sites_web_domain_add.php
+++ b/remoting_client/examples/sites_web_domain_add.php
@@ -18,8 +18,8 @@
 	$client_id = 1;
 	
 	$params = array(
-			'server_id' => 0,
-			'ip_address' => '',
+			'server_id' => 1,
+			'ip_address' => '*',
 			'domain' => 'test2.int',
 			'type' => 'vhost',
 			'parent_domain_id' => 0,

--
Gitblit v1.9.1