Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions htdocs/zipautofillfr/tools/fixcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
echo "Error: Wrong php mode.\n";
exit(-1);
}

Expand Down Expand Up @@ -86,7 +86,7 @@
$res = @include "../../../master.inc.php";
}
if (!$res) {
print "Include of master fails";
print "Error: Include of master fails\n";
exit(-1);
}
// After this $db, $mysoc, $langs, $conf and $hookmanager are defined (Opened $db handler to database will be closed at end of file).
Expand All @@ -98,7 +98,11 @@
// Load user and its permissions
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
if (!($result > 0)) {
dol_print_error('', $user->error); exit;
if ($dolibarr_main_prod) {
print "Error: Something went wrong\n";
} else {
dol_print_error('', $user->error); exit;
}
}
$user->getrights();

Expand Down
Loading