Skip to content

Commit

Permalink
Explicitly cast values to the expected types
Browse files Browse the repository at this point in the history
  • Loading branch information
haszi authored and Girgias committed Jan 14, 2025
1 parent 85aecca commit b4c4bf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion phpdotnet/phd/Package/Generic/XHTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ public function format_literal($open, $name, $attrs)
public function format_literal_text($value, $tag) {
switch ($this->getRole()) {
case 'infdec':
$value = (float)$value;
$value = (string) (float)$value;
$p = strpos($value, '.');
$str = substr($value, 0, $p + 1);
$str .= '<span style="text-decoration: overline;">';
Expand Down
1 change: 1 addition & 0 deletions phpdotnet/phd/Package/PHP/EnhancedCHM.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public function footer($id) {
if ($noteUser) {
$noteUser = '<strong class="user">' . htmlspecialchars($noteUser) . '</strong>';
}
$noteTimestamp = $noteTimestamp === "" ? null : (int) $noteTimestamp;
$noteDate = '<a href="#' . $noteId . '" class="date">' . date("d-M-Y h:i", $noteTimestamp) . '</a>';
$anchor = '<a name="' . $noteId . '""></a>';

Expand Down

0 comments on commit b4c4bf8

Please sign in to comment.