Plugin Directory

Changeset 3459575


Ignore:
Timestamp:
02/12/2026 06:47:05 AM (8 weeks ago)
Author:
cifi
Message:

Fix - warning when post_date and modify_date are null

File:
1 edited

Legend:

Unmodified
Added
Removed
  • squirrly-seo/tags/12.4.15/models/domain/Patterns.php

    r3435711 r3459575  
    2222
    2323    public function getDate() {
    24         if ( $this->_currentpost->post_date ) {
     24        if ( isset($this->_currentpost->post_date) && $this->_currentpost->post_date ) {
    2525            return wp_date( 'c', strtotime( $this->_currentpost->post_date ) );
    2626        } elseif ( $this->_date ) {
     
    514514
    515515    public function getModified() {
    516         if ( $this->_currentpost->post_modified ) {
     516        if ( isset( $this->_currentpost->post_modified ) && $this->_currentpost->post_modified ) {
    517517            return wp_date( 'c', strtotime( $this->_currentpost->post_modified ) );
    518518        } elseif ( $this->_modified ) {
Note: See TracChangeset for help on using the changeset viewer.