You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /usr/local/www/freshports/classes/port-display.php on line 941
#450
Closed
grahamperrin opened this issue
Jul 30, 2023
· 3 comments
Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /usr/local/www/freshports/classes/port-display.php on line 941
Confirmed present on dev. Then fixed with this patch. Tests fine on dev now.
[18:52 dev-nginx01 dan ~/www] % git diff classes/port-display.php
diff --git a/classes/port-display.php b/classes/port-display.php
index 13d18c6c..11d72143 100644
--- a/classes/port-display.php
+++ b/classes/port-display.php
@@ -938,7 +938,7 @@ class port_display {
$HTML .= ' <span class="tooltip">';
if (empty($port->quarterly_revision)) {
$HTML .= 'Port not present on quarterly';
- if (date("Y-m-d", strtotime($port->date_added)) > FirstDateOfCurrentQuarter()) {
+ if (IsSet($port->date_added) && date("Y-m-d", strtotime($port->date_added)) > FirstDateOfCurrentQuarter()) {
$ToolTipText = 'This is expected as this port was created during this quarter.';
} else {
$ToolTipText = 'This missing version is most likely a FreshPorts error.';
Appears:
The text was updated successfully, but these errors were encountered: