Skip to content

Commit e9c0704

Browse files
author
Kousuke Ebihara
committed
fixed that creating member profile will cause segfault (fixes #343)
1 parent 53d1776 commit e9c0704

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/api/opAPICommunityMember.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function createEntryByInstance(Doctrine_Record $communityMember, SimpleXM
8484

8585
foreach ($member->getProfiles() as $profile)
8686
{
87-
$child = $profiles->addChild('div', $profile);
87+
$child = $profiles->addChild('div', (string)$profile);
8888
$child->addAttribute('id', $profile->getName());
8989
}
9090

lib/api/opGDataDocument.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ public function addValidStringToNode($node, $string)
6161

6262
if (Doctrine::getTable('SnsConfig')->get('op_web_api_plugin_using_cdata', false))
6363
{
64-
$child = $doc->createCDataSection($string);
64+
$child = $doc->createCDataSection((string)$string);
6565
}
6666
else
6767
{
68-
$child = $doc->createTextNode($string);
68+
$child = $doc->createTextNode((string)$string);
6969
}
7070

7171
$domNode->appendChild($child);

0 commit comments

Comments
 (0)