On 04/12/2018 01:51 PM, Nodiv Byzero wrote:
> What do you think about adding one more line to check if $config is already 
> set?
> Something like:
>  if (!isset($config)) {
>   ... do the parse_ini_file
>  }
> 
> Just to reduce disk operations.

What is the point? We only check if $AUR_CONFIG isset() because it is
explicitly global, and the function is here to set it if needed or else
do nothing.

$config is locally scoped, and its only purpose is exactly where it is
being used. It should be utterly impossible for it to be set beforehand.

...

On an unrelated note, Bluewind suggested renaming the config.proto to
config.defaults, so if Lukas agrees with this patch I will send in an
amended version.

-- 
Eli Schwartz
Bug Wrangler and Trusted User

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to