Jump to content

Trying to access array offset on value of type null (PHP)

Recommended Posts

I am getting a warning above (IN_DEV) in applications/cms/sources/Categories/Categories.php line 1615

		foreach( $this->children() as $child )
			$childLastPost = $child->lastPost();

			if( !$result OR $childLastPost['date'] > $result['date'] )
				$result = $childLastPost;

You do not check if $childLastPost is NULL, before trying to get $childLastPost['date']

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...