Fixed a bug with parsing “always_link_gancio_post” from the config file; bumped version to 0.3

This commit is contained in:
pezcurrel 2024-10-25 18:16:14 +02:00
parent a64b833b82
commit 28a4f27fe8

View file

@ -18,7 +18,7 @@
$SNAME='GancioFF';
$ENAME=strtolower($SNAME);
$SVERS='0.2';
$SVERS='0.3';
require __DIR__.'/lib/gettlds.php';
require __DIR__.'/lib/mastodon-postLength.php';
@ -261,7 +261,7 @@ if (!is_null($conf['max_post_length'])) {
$conf['max_post_length']+=0;
echo "Info: got «{$conf['max_post_length']}» as «max_post_length» from configuration file.\n";
}
if (!is_null($conf['always_link_gancio_post']) && preg_match('#^(true|false)$#',$conf['always_link_gancio_post'])!==1) {
if (!is_bool($conf['always_link_gancio_post']) && preg_match('#^(true|false)$#',$conf['always_link_gancio_post'])!==1) {
dieYoung("Error: configuration file: «always_link_gancio_post» must be «true» or «false».\n",1);
} else {
($conf['always_link_gancio_post']=='true') ? $conf['always_link_gancio_post']=true : $conf['always_link_gancio_post']=false;