Zenphoto version 1.3.1.2 [6110](nightly)
I'm using printLatestNews() on gallery.php in a modified Zenpage theme. No problems so far.
But with the latest nightly I suddenly get this warning:
`Warning: get_class() expects parameter 1 to be object, null given in ...\zp-core\zp-extensions\zenpage\zenpage-template-functions.php on line 91`.
Comments
Should have known that by now ;-)
Still having a hard time with coding.
Isn't `printLatestNews()` supposed to set it up?
Until a few days ago I was able to use this function anywhere I wanted in Zenpage theme files without any additional coding.
Btw, thanks for implementing duplication of pages and articles!
The error is coming from `getNewsType()`. Guess I had presumed you had looked at line 91. Anyway that function is not called from `printLatestNews()` so I presumed that you thought `printLatestNews()` might be supposed to store something into`$_zp_current_zenpage_news`. It does not and I do not know what it would set it to anyway.
How does the code of the theme page look?
Trying to figure this out I used the standard Zenpage theme and put `printLatestNews()` all the way at the bottom of gallery.php.
But I think I narrowed it down a bit.
`getNewsType()`(and subsequently `get_class()`) is called from `getNewsReadMore()`.
I guess it has something to do with the recent changeset `[6096]`.
edit: Indeed, that's a bug related to the recent change to `getContentShorten()`