From ecbcfc5a207fb007e927f7913510c33f51a271a8 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 4 Nov 2013 21:39:35 +0000 Subject: [PATCH] Set the default parent id to 0, instead of -1, in `Tests_Post_Attachments::_make_attachment()`. Prevents `Out of range value for column 'post_parent'` database error without papering over it in core. See #25282. git-svn-id: https://develop.svn.wordpress.org/trunk@26004 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/post/attachments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/post/attachments.php b/tests/phpunit/tests/post/attachments.php index 89854edd3e..f9a20eba70 100644 --- a/tests/phpunit/tests/post/attachments.php +++ b/tests/phpunit/tests/post/attachments.php @@ -16,7 +16,7 @@ class Tests_Post_Attachments extends WP_UnitTestCase { parent::tearDown(); } - function _make_attachment($upload, $parent_post_id=-1) { + function _make_attachment( $upload, $parent_post_id = 0 ) { $type = ''; if ( !empty($upload['type']) ) {