Changes:
- added type-hint + intval() (@MrPetovan) - also changed `if (!$foo == '')` to `if ($foo != '')` - added some spaces for better readabilitypull/1329/head
parent
3493923a24
commit
90f4ab8b58
|
@ -52,7 +52,7 @@ function convert_content(App $a) {
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getTable($value, $from_unit, $to_unit, $precision): string
|
||||
public function getTable(int $value, $from_unit, $to_unit, $precision): string
|
||||
{
|
||||
$string = '';
|
||||
|
||||
|
@ -187,8 +187,7 @@ function convert_content(App $a) {
|
|||
$o .= '<h3>Unit Conversions</h3>';
|
||||
|
||||
if (isset($_POST['from_unit']) && isset($_POST['value'])) {
|
||||
$_POST['value'] = $_POST['value'] + 0;
|
||||
$o .= ($conv->getTable($_POST['value'], $_POST['from_unit'], $_POST['to_unit'], 5)) . '</p>';
|
||||
$o .= ($conv->getTable(intval($_POST['value']), $_POST['from_unit'], $_POST['to_unit'], 5)) . '</p>';
|
||||
} else {
|
||||
$o .= '<p>Select:</p>';
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ function impressum_footer(App $a, string &$body)
|
|||
{
|
||||
$text = ProxyUtils::proxifyHtml(BBCode::convert(DI::config()->get('impressum','footer_text')));
|
||||
|
||||
if (! $text == '') {
|
||||
if ($text != '') {
|
||||
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/impressum/impressum.css" media="all" />';
|
||||
$body .= '<div class="clear"></div>';
|
||||
$body .= '<div id="impressum_footer">' . $text . '</div>';
|
||||
|
|
Loading…
Reference in New Issue