Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor tweaks

  • Loading branch information...
commit 0156df3212bd30fae226145a8a027045c3b4db76 1 parent 12aa362
@hm2k hm2k authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 Services/Mailman.php
View
10 Services/Mailman.php
@@ -375,6 +375,12 @@ public function subscribe($email, $invite = false)
*/
public function setDigest($email)
{
+ if (!is_string($email)) {
+ throw new Services_Mailman_Exception(
+ 'setDigest() expects parameter 1 to be string, ' .
+ gettype($email) . ' given'
+ );
+ }
$path = '/' . $this->list . '/members';
$query = array('user' => $email,
$email . '_digest' => 1,
@@ -440,8 +446,8 @@ public function members()
$doc->preserveWhiteSpace = false;
$doc->loadHTML($html);
$xpath = new DOMXPath($doc);
- $emails = $xpath->query("/html/body/form/center[1]/table/tr/td[2]/a");
- $names = $xpath->query("/html/body/form/center[1]/table/tr/td[2]/input[1]/@value");
+ $emails = $xpath->query('/html/body/form/center[1]/table/tr/td[2]/a');
+ $names = $xpath->query('/html/body/form/center[1]/table/tr/td[2]/input[1]/@value');
$count = $emails->length;
for ($i=0;$i <= $count;$i++) {
if ($emails->item($i)) { $members[0][]=$emails->item($i)->nodeValue; }
Please sign in to comment.
Something went wrong with that request. Please try again.