Skip to content

Commit

Permalink
misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkingorg committed Nov 2, 2013
1 parent e7d1bb2 commit e0f68b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions lib/DeliciousBrownies.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,14 @@ private function xml2array($xmlstr)
$children = array();
$i = 0;

$xml = simplexml_load_string($xmlstr);
foreach($xml->children() as $child) {
foreach($child->attributes() as $key=>$val) {
$children[$i][$key] = (string)$val;
$xml = @simplexml_load_string($xmlstr);
if (is_object($xml)) {
foreach($xml->children() as $child) {
foreach($child->attributes() as $key=>$val) {
$children[$i][$key] = (string)$val;
}
$i++;
}
$i++;
}
return($children);
}
Expand Down
2 changes: 1 addition & 1 deletion pinboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ function akv3_pinboard_process_tag($tag) {
}

// test run
if ($_GET['ak_action'] == 'pinboard') {
if (isset($_GET['ak_action']) && $_GET['ak_action'] == 'pinboard') {
add_action('admin_init', 'akv3_pinboard_process');
}

0 comments on commit e0f68b4

Please sign in to comment.