ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Errors after Activate Pending Member failed

May 09, 2011 10:51am

Subscribe [2]
  • #1 / May 09, 2011 10:51am

    benbeilharz

    51 posts

    I tried to activate a pending member, and had the email notification box checked, but when I submitted the form I got an error like the one below and now get this error on one of my templates:

    ion clean_email($email) { if ( ! is_array($email)) { if (preg_match('/\<(.*)\>/', $email, $match)) return $match['1']; else return $email; } $clean_email = array(); for ($i=0; $i < count($email); $i++) { if (preg_match( '/\<(.*)\>/', $email[$i], $match)) $clean_email[] = $match['1']; else $clean_email[] = $email[$i]; } return $clean_email; } /* END */ /**————————————————————————/** Strip HTML from message body /**————————————————————————*/ //  This function provides the raw message for use //  in plain-text headers of HTML-formatted emails function strip_html() { $body = ($this->plaintext_body != '') ? $this->plaintext_body : $this->body; if (preg_match('@\@i', $body, $match)) { $body = $match['1']; $body = substr($body, strpos($body, ">") + 1); } $body = trim(strip_tags($body)); $body = preg_replace( ‘##’, “”, $body); $body = str_replace(”\t”, “”, $body); for ($i = 20; $i >= 3; $i—) { $n = ""; for ($x = 1; $x <= $i; $x ++) $n .= $this->newline; $body = str_replace($n, $this->newline.$this->newline, $body); } return $this->word_wrap($body, ‘76’); } /* END */ /**——————————————————- /** Word Wrap /**——————————————————-*/ function word_wrap($str, $charlim = ‘’) { // Set the character limit if ($charlim == '') { $charlim = ($this->wrapchars == "") ? "76" : $this->wrapchars; } // Reduce multiple spaces $str = preg_replace(”| +|”, ” “, $str); // Standardize newlines $str = preg_replace(”/\r\n|\r/”, “\n”, $str); // If the current word is surrounded by {unwrap} tags we’ll // strip the entire chunk and replace it with a marker. $unwrap = array(); if (preg_match_all(”|(\{unwrap\}.+?\{/unwrap\})|s”, $str, $matches)) { for ($i = 0; $i < count($matches['0']); $i++) { $unwrap[] = $matches['1'][$i]; $str = str_replace($matches['1'][$i], "{{unwrapped".$i."}}”, $str); } } // Use PHP’s native function to do the initial wordwrap. // We set the cut flag to FALSE so that any individual words that are // too long get left alone. In the next step we’ll deal with them. $str = wordwrap($str, $charlim, “\n”, FALSE); // Split the string into individual lines of text and cycle through them $output = “”; foreach (explode(”\n”, $str) as $line) { // Is the line within the allowed character count? // If so we'll join it to the output and continue if (strlen($line) <= $charlim) { $output .= $line.$this->newline; continue; } $temp = ‘’; while((strlen($line)) > $charlim) { // If the over-length word is a URL we won't wrap it if (preg_match("!\[url.+\]|://|wwww.!", $line)) { break; } // Trim the word down $temp .= substr($line, 0, $charlim-1); $line = substr($line, $charlim-1); } // If $temp contains data it means we had to split up an over-length // word into smaller chunks so we’ll add it back to our current line if ($temp != ‘’) { $output .= $temp.$this->newline.$line; } else { $output .= $line; } $output .= $this->newline; } // Put our markers back if (count($unwrap) > 0) { foreach ($unwrap as $key => $val) { $output = str_replace("{{unwrapped".$key."}}”, $val, $output); } } return $output;    } /* END */ function prep_quoted_printable($str, $charlim = ‘’) { // Set the character limit // Don't allow over 76, as that will make servers and MUAs barf // all over quoted-printable data if ($charlim == '' OR $charlim > '76') { $charlim = '76'; } // Reduce multiple spaces $str = preg_replace(”| +|”, ” “, $str); // Standardize newlines $str = preg_replace(”/\r\n|\r/”, “\n”, $str); // kill nulls $str = preg_replace(’/\x00+/’, ‘’, $str); // We are intentionally wrapping so mail servers will encode characters // properly and MUAs will behave, so {unwrap} must go! $str = str_replace(array(’{unwrap}’, ‘{/unwrap}’), ‘’, $str); // Break into an array of lines $lines = preg_split(”/\n/”, $str); $escape = ‘=’; $output = ‘’; foreach ($lines as $line) { $length = strlen($line); $temp = ''; // Loop through each character in the line to add soft-wrap // characters at the end of a line " =\r\n" and add the newly // processed line(s) to the output for ($i = 0; $i < $length; $i++) { // Grab the next character $char = substr($line, $i, 1); $ascii = ord($char); // Convert spaces and tabs but only if it's the end of the line if ($i == ($length - 1)) { $char = ($ascii == '32' OR $ascii == '9') ? $escape.sprintf('s', dechex($ascii)) : $char; } // encode = signs if ($ascii == ‘61’) { $char = $escape.strtoupper(sprintf('s', dechex($ascii))); // =3D } // If we’re at the character limit, add the line to the output, // reset our temp variable, and keep on chuggin’ if ((strlen($temp) + strlen($char)) >= $charlim) { $output .= $temp.$escape.$this->crlf; $temp = ''; } // Add the character to our temporary line $temp .= $char; } // Add our completed line to the output $output .= $temp.$this->crlf; } // get rid of extra CRLF tacked onto the end $output = substr($output, 0, strlen($this->crlf) * -1); return $output; } /* END */ function prep_q_encoding($str, $from = FALSE) { global $PREFS; $str = str_replace(array(”\r”, “\n”), array(’‘, ‘’), trim($str)); // Line length must not exceed 76 characters, so we adjust for // a space, 7 extra characters =??Q??=, and the charset that we will add to each

    ... etc

    Help?

  • #2 / May 09, 2011 3:57pm

    Brandon Jones

    5500 posts

    Hi beilz,

    What version and build of EE are you using? I would highly recommend updating to ensure you’ve got an intact set of files.

  • #3 / May 09, 2011 11:07pm

    benbeilharz

    51 posts

    Thanks, I uploaded the latest build and it’s fixed.

  • #4 / May 10, 2011 3:02pm

    Greg Aker

    6022 posts

    beilz:

    I’m glad that did it for you, don’t hesitate to start a new thread if anything else comes up!

    -greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases