Unverified Commit 43ec78e4 authored by David Beniamine's avatar David Beniamine
Browse files

Cleaner error handling

parent fe233a17
......@@ -33,17 +33,13 @@ error_reporting(E_ALL);
extract($_POST);
if(!isset($action)){
$lines=explode(PHP_EOL, shell_exec("../scripts/get_registry.sh"));
exec("../scripts/get_registry.sh", $lines, $code);
?>
<p>
<?php
$n=count($lines);
if(empty($lines)){
echo "Impossible de récupérer le registre";
ob_start();
shell_exec("../scripts/get_registry.sh");
$lines=ob_get_clean();
echo "$lines";
echo "Impossible de récupérer le registre, code $code";
}else if ($n == 1){
echo "$n poste est enregistré sur ce serveur";
}else{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment