Skip to content

Prevent missing post index notice when switching themes #29

Merged
merged 1 commit into from Sep 17, 2013

2 participants

@mpeshev
mpeshev commented Sep 16, 2013

Found that accidentally while switching themes testing some Core functionality. My error log spit:

[Tue Sep 17 00:58:42 2013] [error] [client 127.0.0.1] PHP Notice:  Undefined index: post in /opt/lampp/htdocs/wpbleeding/wp-content/plugins/Debug-Objects/inc/class-rewrite_backtrace.php on line 65, referer: http://localhost/wpbleeding/wp-admin/themes.php?activated=true
[Tue Sep 17 00:58:42 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/wpbleeding/wp-admin/themes.php?activated=true
[Tue Sep 17 00:58:42 2013] [error] [client 127.0.0.1] PHP   1. {main}() /opt/lampp/htdocs/wpbleeding/wp-admin/themes.php:0, referer: http://localhost/wpbleeding/wp-admin/themes.php?activated=true
[Tue Sep 17 00:58:42 2013] [error] [client 127.0.0.1] PHP   2. wp_redirect() /opt/lampp/htdocs/wpbleeding/wp-admin/themes.php:24, referer: http://localhost/wpbleeding/wp-admin/themes.php?activated=true
[Tue Sep 17 00:58:42 2013] [error] [client 127.0.0.1] PHP   3. apply_filters() /opt/lampp/htdocs/wpbleeding/wp-includes/pluggable.php:881, referer: http://localhost/wpbleeding/wp-admin/themes.php?activated=true
[Tue Sep 17 00:58:42 2013] [error] [client 127.0.0.1] PHP   4. call_user_func_array() /opt/lampp/htdocs/wpbleeding/wp-includes/plugin.php:173, referer: http://localhost/wpbleeding/wp-admin/themes.php?activated=true
[Tue Sep 17 00:58:42 2013] [error] [client 127.0.0.1] PHP   5. Debug_Objects_Rewrite_Backtrace->redirect_debug() /opt/lampp/htdocs/wpbleeding/wp-includes/plugin.php:173, referer: http://localhost/wpbleeding/wp-admin/themes.php?activated=true

I didn't find where this variable is used in the first place, but browsed for a bit and got no more error_log notices. If it isn't used at all, I can just remove that line (or change the default value to something else).

@bueltge bueltge merged commit fdc676c into bueltge:master Sep 17, 2013
@bueltge
Owner
bueltge commented Sep 17, 2013

thanks again!

@mpeshev
mpeshev commented Sep 17, 2013

of course :)

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.