Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

function bootstrapwp_autoset_featured_img #46

Open
Interned opened this Issue · 10 comments

3 participants

@Interned

Hi,

I don't know if I'm the only one who gets issue from that function but anytime I want to change the template file for a page in the back-end, I've got php warnings refered to the function bootstrapwp_autoset_featured_img, specifically these lines :
$already_has_thumb = has_post_thumbnail($post->ID);
$attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" );
set_post_thumbnail($post->ID, $attachment_id);

with "Notice: Trying to get property of non-object"
and :
Notice: Trying to get property of non-object in .../wordpress/wp-includes/post.php on line 5186
Notice: Trying to get property of non-object in .../wordpress/wp-includes/post.php on line 4912
Notice: Trying to get property of non-object in .../wordpress/wp-includes/post-template.php on line 30

@rachelbaker
Owner

What version of WordPress are you running? And is this still an issue?

@AaronHolbrook

I'm having the same issues. Running a brand new vanilla install of 3.4.1

@rachelbaker
Owner

Thanks for the information, Aaron. Does this happen only when trying to change a page/post template?

@AaronHolbrook
@rachelbaker
Owner

Aaron, are you running PHP 5.4? I think that is issue.

@AaronHolbrook
@rachelbaker
Owner

Thanks, I will check it out this weekend.

@rachelbaker
Owner

Both php errors are fixed in this commit on the 1-WIP branch:
c3b607a

@rachelbaker rachelbaker closed this
@AaronHolbrook

Awesome, will have to test it out

@rachelbaker rachelbaker reopened this
@rachelbaker
Owner

Oops, looks like there are still errors on the "add new" post or page screens.

Looking into if this is fixable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.