1 (edited by 2012-07-07 21:23:50)

Topic: htmlspecialchars() and preg_match() errors.

Hello~ I'm having some trouble with getting the news on my website to show. I'm having some errors, which I have shown below.

WARNING: htmlspecialchars() expects parameter 1 to be string, array given in /HOME/SKYBLADE/PUBLIC_HTML/RAPTURE/CUTENEWS/INC/FUNCTIONS.INC.PHP on line 66

line 66: $start_from = htmlspecialchars($start_from);


WARNING: preg_match() expects parameter 2 to be string, array given in /HOME/SKYBLADE/PUBLIC_HTML/RAPTURE/CUTENEWS/SHOW_NEWS.PHP on line 44

line 44: else{ die("Error!
the template [b]".htmlspecialchars($template)."[/b] does not exists, note that template ...etc


What can I do to fix this up so that everything works again? It's the only thing on my website that is stumping me. ^^;
Thank you for the help!

Re: htmlspecialchars() and preg_match() errors.

WARNING: preg_match() expects parameter 2 to be string, array given in /HOME/SKYBLADE/PUBLIC_HTML/RAPTURE/CUTENEWS/SHOW_NEWS.PHP on line 44

your line 44 doesn't have th function preg_match
So it's probably some lines around 44. This can be different depending on the editor (doesn't happen often but it can)

Also please check if example2.php that came with the cn zip does work. if so, it's likely that some other php script on your page is causing trouble.
And then a code rewrite needs to be done.

Re: htmlspecialchars() and preg_match() errors.

Okay, thank you! I am using a script that seems to be running cutenews into error. I was hoping there was a quick fix for it. I appreciate the reply!

Posts: 3

Pages 1

You must login or register to post a reply

CutePHP Forums → Problem Solving / Help & Support → htmlspecialchars() and preg_match() errors.