Dealing with Errors in Custom Code

5 posts by 2 authors in: Forums > CMS Builder
Last Post: July 5, 2016   (RSS)

By Daryl - July 5, 2016

Hi Perch,

I wouldn't recommend ignoring the error. 

Instead, I'd check if "=" symbol exists first before exploding it.

Cheers,

Daryl Maximo
PHP Programmer - interactivetools.com

By Perchpole - July 5, 2016

Hi, Daryl -

As I said in my original post, I know that "=" does not appear in every variable. I don't know how to run the check you mentioned. That's why I'm here for help!

:0)

Perch

By Daryl - July 5, 2016

Ah, yes.

You can use the CMSB function called contains($needle, $haystack) which returns true if the needle is found.
Example:

if (contains("=", $lines[$i])){
 //
}

Let me know if this works on your set up.

Daryl Maximo
PHP Programmer - interactivetools.com

By Perchpole - July 5, 2016

Perfect. It works!

Thanks for your help.

:0)

Perch