close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Deprecated: Function split()

Thread began 11/16/2012 5:44 am by jjh195858 | Last modified 1/04/2013 9:55 am by Jason Byrnes | 2271 views | 10 replies |

jjh195858

Deprecated: Function split()

Hi.

I implemented the Contact Form Solutions pack 1.0.3 to a site also with Universal Email 4 and am getting the following errors, after clicking send. The form does send the email but it remains on the contact page, does not direct to the contact thank you page, and shows this error at the top of the page:

Deprecated: Function split() is deprecated in /home/content/b/i/r/birardij/html/WA_Universal_Email/MailFormatting_PHP.php on line 42

Deprecated: Function split() is deprecated in /home/content/b/i/r/birardij/html/WA_Universal_Email/MailFormatting_PHP.php on line 42

Warning: Cannot modify header information - headers already sent by (output started at /home/content/b/i/r/birardij/html/WA_Universal_Email/MailFormatting_PHP.php:42) in /home/content/b/i/r/birardij/html/plumber-new-jersey-contact.php on line 35



The code on line 42 of the MailFormatting_PHP.php is:
$domArr = split("\.",$domainName);

The code on line 35 of the contact page is:
34 if ("index.php"!="") {
35 header("Location: thankyou.php");
36 }

Any help would be greatly appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

change:
$domArr = split("\.",$domainName);


to:
$domArr = explode("\.",$domainName);

Sign in to reply to this post

jjh195858

Thanks!

Hi again.

Would changing "split" to "explode" stop the email from sending? My emails stopped sending.

Sign in to reply to this post

colin282897

I'm getting the same error now that the server has been upgraded from 5.2 to 5.3. I tried changing the split to explode without any successes. Can anyone shed some more light onto this subject?

Thank you

Sign in to reply to this post

Ray BorduinWebAssist

What product are you using? I'm pretty sure we have removed all of the references to split() in the latest version of all of our extensions, so I'd like to know what page or extension you are using that has this issue still, or at least confirm it is an older version.

The solution is to either upgrade, to manually go through the code and change the split() to explode(), or to turn off warnings because it will actually still work and the warning could simply be ignored for now.

Sign in to reply to this post
Did this help? Tips are appreciated...

colin282897

So, the version I have of Universal email is 3.0.7 which according to my account is the latest version.

The code on line 42 of the MailFormatting_PHP.php is:
$domArr = split("\.",$domainName);

Ive tried changing this to explode without any joy.

Sign in to reply to this post

Jason ByrnesWebAssist

Universal Email 3.0.7 is an older version. it has been replaced by UE 4 then CSS Form builder and now Data Bridge

changing split to explode should fix the problem, it may occur in a couple of places you will need to make the change in each place that references the split function.

Sign in to reply to this post

colin282897

This is the reply from my customer on the subject

Thank you for trying, but unfortunately it didn’t work. I changed all instances of split( to explode( but it’s made no difference. Other functions that included the word split I left alone, such as

$dotted = preg_split( "/[.]+/", $dotted);

$encoded = chunk_split(base64_encode($str), 76, $this->LE);

$splitBreak = "--WAMULTIBREAKWA";

And I guess that must be right.



I even changed return document.cookie.match(re)[0].split("=")[1] //return its value, even though it was in a file that had nothing to do with mailing.



All is back as-was now, and running brilliantly in 5.2.

Sign in to reply to this post

Jason ByrnesWebAssist

I would guess that the changes are not being properly uploaded to the server.

If you run into the problem again, i can start an incident to look into it with you.

Sign in to reply to this post

colin282897

Asked my client to check all have been updated, she assures me they have so as she says we must be missing something.

Client reply below:-


Nope. We must all be missing something.

As far as I can see there are only two files that need changing:

1. MailFormatting_PHP.php, and

2. WAVT_Scripts_PHP.php

The first has just one instances of Split on row 42, the second has 6 instances on rows 152, 330, 389, 587, 590, and 660. I did a global search over the whole site, so I don’t think I can have missed anything.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...