Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Notice: jetpack/modules/custom-css/custom-css-4.7.php:153 - Undefined index: post_type #6128

Closed
pento opened this issue Jan 19, 2017 · 2 comments · Fixed by #6154
Closed
Assignees
Labels
[Feature] Custom CSS [Pri] Low [Type] Bug When a feature is broken and / or not performing as intended

Comments

@pento
Copy link
Contributor

pento commented Jan 19, 2017

I'm not entirely sure how to reproduce this notice, I think it's to do with when a post draft is saved by clicking the "Save Draft" button. But, it's showing up in the error logs, so I'm reporting it here. :-)

@pento pento added [Feature] Custom CSS [Type] Bug When a feature is broken and / or not performing as intended labels Jan 19, 2017
@jeherve jeherve added this to the 4.6 milestone Jan 19, 2017
@ocean90
Copy link

ocean90 commented Jan 23, 2017

Here's the stack:

Notice: Undefined index: post_type in /public_html/wp-content/plugins/jetpack/modules/custom-css/custom-css-4.7.php on line 153
Call Stack
#	Time	Memory	Function	Location
1	0.0005	373448	{main}( )	.../post.php:0
2	0.9686	7156584	wp_trash_post( )	.../post.php:221
3	0.9809	7142584	wp_insert_post( )	.../post.php:2611
4	1.1729	7294120	do_action( )	.../post.php:3479
5	1.1730	7294496	WP_Hook->do_action( )	.../plugin.php:453
6	1.1730	7294496	WP_Hook->apply_filters( )	.../class-wp-hook.php:323
7	1.1906	7317224	Email_Post_Changes->post_updated( )	.../class-wp-hook.php:298
8	1.1977	7314048	_wp_post_revision_fields( )	.../class.email-post-changes.php:102
9	1.1977	7314048	apply_filters( )	.../revision.php:56
10	1.1977	7314448	WP_Hook->apply_filters( )	.../plugin.php:203
11	1.1977	7315200	Jetpack_Custom_CSS_Enhancements::_wp_post_revision_fields( )	.../class-wp-hook.php:298

( ! ) Notice: Undefined index: post_type in /public_html/wp-content/plugins/jetpack/modules/custom-css/custom-css-4.7.php on line 157
Call Stack
#	Time	Memory	Function	Location
1	0.0005	373448	{main}( )	.../post.php:0
2	0.9686	7156584	wp_trash_post( )	.../post.php:221
3	0.9809	7142584	wp_insert_post( )	.../post.php:2611
4	1.1729	7294120	do_action( )	.../post.php:3479
5	1.1730	7294496	WP_Hook->do_action( )	.../plugin.php:453
6	1.1730	7294496	WP_Hook->apply_filters( )	.../class-wp-hook.php:323
7	1.1906	7317224	Email_Post_Changes->post_updated( )	.../class-wp-hook.php:298
8	1.1977	7314048	_wp_post_revision_fields( )	.../class.email-post-changes.php:102
9	1.1977	7314048	apply_filters( )	.../revision.php:56
10	1.1977	7314448	WP_Hook->apply_filters( )	.../plugin.php:203
11	1.1977	7315200	Jetpack_Custom_CSS_Enhancements::_wp_post_revision_fields( )	.../class-wp-hook.php:298

The optional $post argument for _wp_post_revision_fields() was added in 4.5. While core passes the $post argument plugins like Email Post Changes do not. https://plugins.trac.wordpress.org/browser/email-post-changes/trunk/class.email-post-changes.php?rev=1214233#L102

@pento pento self-assigned this Jan 24, 2017
@pento pento modified the milestones: 4.5.1, 2/17 - February Jan 24, 2017
@pento
Copy link
Contributor Author

pento commented Jan 24, 2017

This is causing a mess of the error logs on w.org, so I'm moving this to the next point release.

@jeherve jeherve modified the milestones: 4.5.1, 2/17 - February Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Custom CSS [Pri] Low [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants