libxml errors

This commit is contained in:
zotlabs 2017-08-09 17:35:03 -07:00
parent 8eb6dafe31
commit 6531cbd1d2
4 changed files with 7 additions and 6 deletions

View File

@ -713,7 +713,6 @@ class ThreadItem {
call_hooks('comment_buttons',$arr); call_hooks('comment_buttons',$arr);
$comment_buttons = $arr['comment_buttons']; $comment_buttons = $arr['comment_buttons'];
$comment_box = replace_macros($template,array( $comment_box = replace_macros($template,array(
'$return_path' => '', '$return_path' => '',
'$threaded' => $this->is_threaded(), '$threaded' => $this->is_threaded(),

View File

@ -18,6 +18,7 @@ class ThreadStream {
private $observer = null; private $observer = null;
private $writable = false; private $writable = false;
private $commentable = false; private $commentable = false;
private $uploadable = false;
private $profile_owner = 0; private $profile_owner = 0;
private $preview = false; private $preview = false;
private $prepared_item = ''; private $prepared_item = '';

View File

@ -538,7 +538,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
} }
elseif ($mode === 'photos') { elseif ($mode === 'photos') {
$profile_onwer = App::$profile['profile_uid']; $profile_owner = App::$profile['profile_uid'];
$page_writeable = ($profile_owner == local_channel()); $page_writeable = ($profile_owner == local_channel());
$live_update_div = '<div id="live-photos"></div>' . "\r\n"; $live_update_div = '<div id="live-photos"></div>' . "\r\n";
// for photos we've already formatted the top-level item (the photo) // for photos we've already formatted the top-level item (the photo)

View File

@ -671,11 +671,12 @@ function parse_xml_string($s,$strict = true) {
libxml_use_internal_errors(true); libxml_use_internal_errors(true);
$x = @simplexml_load_string($s2); $x = @simplexml_load_string($s2);
if(! $x) { if($x === false) {
logger('libxml: parse: error: ' . $s2, LOGGER_DATA); logger('libxml: parse: error: ' . $s2, LOGGER_DATA);
foreach(libxml_get_errors() as $err) foreach(libxml_get_errors() as $err) {
logger('libxml: parse: ' . $err->code." at ".$err->line.":".$err->column." : ".$err->message, LOGGER_DATA); logger('libxml: parse: ' . $err->code . ' at ' . $err->line
. ':' . $err->column . ' : ' . $err->message, LOGGER_DATA);
}
libxml_clear_errors(); libxml_clear_errors();
} }