Using “[]” for arrays is better :-)
This commit is contained in:
parent
1f5559b5b5
commit
95e4b9366e
1 changed files with 2 additions and 2 deletions
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
require(__DIR__.'/ckkeys.php');
|
||||
require __DIR__.'/ckkeys.php';
|
||||
|
||||
function getiniarr() {
|
||||
$inifp='../../conf/mustard.ini';
|
||||
$iniarr=parse_ini_file($inifp)
|
||||
or muoribene('Couldn’t open configuration file «'.$inifp.'».',false);
|
||||
$missing=ckkeys(array('db_host','db_port','db_socket','db_name','db_admin_name','db_admin_password','ref_name','ref_email','site_domain','mail_test_to'),$iniarr);
|
||||
$missing=ckkeys(['db_host','db_port','db_socket','db_name','db_admin_name','db_admin_password','ref_name','ref_email','site_domain','mail_test_to'],$iniarr);
|
||||
if (count($missing)>0)
|
||||
muoribene('Configuration file «'.$inifp.'» is missing some required fields: “'.implode('”, “',$missing).'”.',false);
|
||||
return($iniarr);
|
||||
|
|
Loading…
Reference in a new issue