Page 1 of 1

wxcurecords.php issue

Posted: Fri 05 Oct 2018 6:28 pm
by aznetcowboy
When checking out my links, for the All-Time Records I am getting the following Error:

Highest Humidity
Warning: Missing argument 1 for langtrans(), called in /home/gydfbaoo/public_html/wxcurecords.php on line 105 and defined in /home/gydfbaoo/public_html/common.php on line 60
99 % 27-Jan-2013 6:10am

Lowest Humidity
Warning: Missing argument 1 for langtrans(), called in /home/gydfbaoo/public_html/wxcurecords.php on line 110 and defined in /home/gydfbaoo/public_html/common.php on line 60
0 % 18-Sep-2013 3:10pm
Highest Dew Point
Warning: Missing argument 1 for langtrans(), called in /home/gydfbaoo/public_html/wxcurecords.php on line 116 and defined in /home/gydfbaoo/public_html/common.php on line 60
93.3 °F 23-Jul-2013 4:35pm
Lowest Dew Point
Warning: Missing argument 1 for langtrans(), called in /home/gydfbaoo/public_html/wxcurecords.php on line 121 and defined in /home/gydfbaoo/public_html/common.php on line 60


The code they referenced is in the wxcurecords.php (which I believe is current) for example with the Highest Humidity:

104<tr class="column-light">
105 <td><?php langtrans('Highest Humidity'); ?> <?php langtrans(); ?> </td>
106 <td><?php print $WX['humH']; ?> <?php print $SITE['uomHum']; ?></td>
107 <td><?php print fix_CU_record_date($WX['ThumH']); ?></td>
108</tr>


The other three have basically the same code. The langtrans code they are referencing is:

function langtrans ( $item ) {
global $LANGLOOKUP,$missingTrans;

if(isset($LANGLOOKUP[$item])) {
echo $LANGLOOKUP[$item];
} else {
if(isset($item) and $item <> '') {$missingTrans[$item] = true; }
echo $item;
}


This error is only when viewing the All-Time Records, the others all display correctly. I am currently baffled by only these four records having this problem. Am I blind in one eye while having problems seeing out of the other eye or what?
:?

Re: wxcurecords.php issue

Posted: Fri 05 Oct 2018 6:48 pm
by aznetcowboy
Forget what I posted here, I found the solution. It was right in front of me the whole time and I just could not see the obvious problem and solution.
:groan:

All I needed to do was to take line 105
<?php langtrans('Highest Humidity'); ?> <?php langtrans(); ?>

and change it to
<?php langtrans('Highest'); ?> <?php langtrans(' Humidity'); ?>

The same for lines 110, 116 and 121. This is a real good example of the most apparent solution is staring me right in the face and I couldn't see it.
:bash:

Re: wxcurecords.php issue

Posted: Fri 05 Oct 2018 9:00 pm
by PaulMy
Glad you found it and able to correct.

Enjoy,
Paul