Type error when redirecting after post save, url_to_postid() may return the id as int or str, for 2.7

git-svn-id: http://svn.automattic.com/wordpress/trunk@8530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz
2008-08-04 05:15:36 +00:00
parent ccbc13a123
commit 293f185635
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ $saveasdraft = '<input name="save" type="submit" id="save" class="button" tabind
<input name="referredby" type="hidden" id="referredby" value="<?php
if ( !empty($_REQUEST['popupurl']) )
echo clean_url(stripslashes($_REQUEST['popupurl']));
else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) === $post_ID )
else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID )
echo 'redo';
else
echo clean_url(stripslashes(wp_get_referer()));