Sfoglia il codice sorgente

Install : correctif notice variables non définie

carruesco 2 anni fa
parent
commit
9531bc2be6
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      install.php

+ 5 - 5
install.php

@@ -169,7 +169,7 @@ try {
 			$parts = explode('?',$root);
 			$root = array_shift($parts);
 
-			if( method_exists($custom['class'], 'pre_form') ) $custom['class']::pre_form();
+			if(isset($custom) &&  method_exists($custom['class'] , 'pre_form') ) $custom['class']::pre_form();
 			?>
 
 			<div class="row justify-content-md-center">
@@ -222,7 +222,7 @@ try {
 			</div>
 			<?php
 
-			if( method_exists($custom['class'], 'post_form') ) $custom['class']::post_form();
+			if(isset($custom) &&  method_exists($custom['class'] , 'post_form') ) $custom['class']::post_form();
 		}
 	} catch (Exception $e) { ?>
 			<div class="alert alert-danger">
@@ -245,7 +245,7 @@ try {
 	<script src="js/vendor/mustache.min.js"></script>
 	<script src="js/plugins.js"></script>
 	<script src="js/main.js"></script>
-	<?php if( method_exists($custom['class'], 'js') ): ?>
+	<?php if(isset($custom) &&  method_exists($custom['class'] , 'js') ): ?>
 		<link href="<?php echo $custom['plugin'].$custom['class']::js(); ?>" rel="stylesheet">
 	<?php endif; ?>
 	<script type="text/javascript">
@@ -300,7 +300,7 @@ function install_core($parameters,$custom){
 	require_once(__ROOT__.'class'.SLASH.'Entity.class.php');
 
 
-	if( method_exists($custom['class'], 'pre_install') ) $custom['class']::pre_install();
+	if(isset($custom) &&  method_exists($custom['class'] , 'pre_install') ) $custom['class']::pre_install();
 
 	//install entities
 	Entity::install(__ROOT__.'class');
@@ -415,7 +415,7 @@ function install_core($parameters,$custom){
 		}
 	}
 
-	if( method_exists($custom['class'], 'post_install') ) $custom['class']::post_install();
+	if(isset($custom) &&  method_exists($custom['class'] , 'post_install') ) $custom['class']::post_install();
 			
 }