summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-11 13:41:38 +0000
committeruckelman <uckelman@nomic.net>2010-04-11 13:41:38 +0000
commiteec95b8ff65316efd6b294898cf752fbfeb81e79 (patch)
tree3164874319d37a4ea95d6423f4474b3c5c2f7aa2
parent29b42706b95f767cddcc8e7620a0a7070f4d289b (diff)
Should pass tests now.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6644 67b53d14-2c14-4ace-a08f-0dab2b34000c
-rw-r--r--src/Bridge.php4
-rw-r--r--test/BridgeTest.php2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/Bridge.php b/src/Bridge.php
index 3b9b1b4..9dfd758 100644
--- a/src/Bridge.php
+++ b/src/Bridge.php
@@ -29,6 +29,10 @@ class Bridge {
}
public function setPostId($messageId, $postId) {
+ if ($messageId === null) {
+ trigger_error('message id is null', E_USER_ERROR);
+ }
+
$sql = 'UPDATE posts SET ' .
'post_id = ' . $postId . ' ' .
'WHERE message_id = ' . $this->db->quote($messageId);
diff --git a/test/BridgeTest.php b/test/BridgeTest.php
index 7101c77..a43acd2 100644
--- a/test/BridgeTest.php
+++ b/test/BridgeTest.php
@@ -108,7 +108,7 @@ class BridgeTest extends PHPUnit_Framework_TestCase {
public function providerRegisterMessage() {
return array(
- array(null, null, null, null, null, 'PHPUnit_Framework_Error'),
+ array(null, null, null, null, 'PHPUnit_Framework_Error'),
array(
'<20100302094228.33F0310091@charybdis.ellipsis.cx>',
null,