summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/doc.php7
-rw-r--r--plugins/OStatus/lib/salmonaction.php1
2 files changed, 8 insertions, 0 deletions
diff --git a/actions/doc.php b/actions/doc.php
index eaf4b7df2..459f5f096 100644
--- a/actions/doc.php
+++ b/actions/doc.php
@@ -173,6 +173,10 @@ class DocAction extends Action
}
$local = glob(INSTALLDIR.'/local/doc-src/'.$this->title.'.*');
+ if ($local === false) {
+ // Some systems return false, others array(), if dir didn't exist.
+ $local = array();
+ }
if (count($local) || isset($localDef)) {
return $this->negotiateLanguage($local, $localDef);
@@ -183,6 +187,9 @@ class DocAction extends Action
}
$dist = glob(INSTALLDIR.'/doc-src/'.$this->title.'.*');
+ if ($dist === false) {
+ $dist = array();
+ }
if (count($dist) || isset($distDef)) {
return $this->negotiateLanguage($dist, $distDef);
diff --git a/plugins/OStatus/lib/salmonaction.php b/plugins/OStatus/lib/salmonaction.php
index 87e98ad35..11c411c7d 100644
--- a/plugins/OStatus/lib/salmonaction.php
+++ b/plugins/OStatus/lib/salmonaction.php
@@ -51,6 +51,7 @@ class SalmonAction extends Action
if ($dom->documentElement->namespaceURI != Activity::ATOM ||
$dom->documentElement->localName != 'entry') {
+ common_log(LOG_DEBUG, "Got invalid Salmon post: $xml");
$this->clientError(_m('Salmon post must be an Atom entry.'));
}
// XXX: check the signature