Cast to int. Props xknown. fixes #4012 for trunk.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-03-22 01:04:19 +00:00
parent b5a124634e
commit 9f9d9a8d9e

View File

@ -117,6 +117,7 @@ function post_permalink($post_id = 0, $mode = '') { // $mode legacy
function get_page_link($id = false) {
global $post;
$id = (int) $id;
if ( !$id )
$id = $post->ID;