News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Syntax error in the log

Started by MoonCat, April 16, 2021, 03:45:33 PM

Previous topic - Next topic

MoonCat

Hi all,

need help in figuring out the culprit of the issue.
Reviewing the log I noticed the below error, generated by newly registered user:

https://myweb.com/index.php?action=search
syntax error, unexpected '0' (T_LNUMBER), expecting ';' or ','


I tried to play w/ search in different ways, but it always works well for me.
How would you go about it figuring out what's the problem?

Thank You,
MoonCat

Shambles

Isn't the actual script name and line number included in the error report?

MoonCat

Quote from: Shambles on April 16, 2021, 04:06:53 PM
Isn't the actual script name and line number included in the error report?

That's all I see in the error log. No specifics. That's why I don't know even where to start.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MoonCat

2.0.18

1.   BBCode with style   1.5.2   [ Удаление мода ]
2.   Smart Cache   0.0.2   [ Удаление мода ]
3.   Tabs In Posts   1.2   [ Удаление мода ]
4.   Anti-spam by CleanTalk   2.32   [ Удаление мода ]
5.   SMF 2.0.18 Update   0.1.0   [ Удаление мода ]
6.   Jouele 4 SMF   0.4   [ Удаление мода ]
7.   Scrolling Buttons   0.5   [ Удаление мода ]
8.   Alternate User Posting   1.0.1   [ Удаление мода ]
9.   Change All Subjects   1.3   [ Удаление мода ]
10.   Enhancements to reattribute posts   1.5.10   [ Удаление мода ]
11.   Advance Fake Guests & Users Online (afguo)   1.2.2   [ Удаление мода ]
12.   Memberlist Additional Alphabet   2.0   [ Удаление мода ]
13.   Default Avatar   2.3   [ Удаление мода ]
14.   Images with Margins and Borders   1.8   [ Удаление мода ]
15.   Auto Merge Double Post   1.5   [ Удаление мода ]
16.   SMFPacks: IMGUR Mod   1.0.0   [ Удаление мода ]
17.   SMFPacks: SEO Pro Mod   2.4.4   [ Удаление мода ]
18.   Lazy Admin Menu   2.5   [ Удаление мода ]
19.   Global Headers Footers   2.1a   [ Удаление мода ]
20.   SMF Mobile Theme Selector   1.0.3   [ Удаление мода ]
21.   SMFPacks Mentions   2.0.4   [ Удаление мода ]
22.   Yet Another YouTube BBCode Tag   4.14   [ Удаление мода ]
23.   Bookmarks   2.5   [ Удаление мода ]
24.   Copy Topics   1.7.1   [ Удаление мода ]
25.   Disable to send EMail with Forum-System for Users lower than Admin   1.0   [ Удаление мода ]
26.   SMF 2.1-style Admin Area   1.11   [ Удаление мода ]
27.   SMF 2.0.17 Update   1.0   [ Удаление мода ]
28.   SMF 2.0.16 Update   1.0   [ Удаление мода ]
29.   SMF Activity Stream PRO   2.0.7   [ Удаление мода ]
30.   SMFPacks Emoji Picker   1.0.3   [ Удаление мода ]
31.   SMFPacks WYSIWYG Editor   3.0.2   [ Удаление мода ]
32.   PM to New Members   1.2   [ Удаление мода ]
33.   Smart Pagination   0.8.3   [ Удаление мода ]
34.   Limit Guest Views   1.0   [ Удаление мода ]
35.   SMFPacks: No Copy Mod   1.0.0   [ Удаление мода ]
36.   SMFPacks Alerts Pro   2.0.18   [ Удаление мода ]
37.   Advanced Reputation System   1.8.3   [ Удаление мода ]
38.   SMFPacks Super Quotes   1.0.6   [ Удаление мода ]
39.   Quick Spoiler   1.1.1   [ Удаление мода ]
40.   SMF 2.0.15 Update   1.0   [ Удаление мода ]
41.   SMF 2.0.14 Update   1.0   [ Удаление мода ]
42.   SMF 2.0.13 Update   1.0   [ Удаление мода ]
43.   SMF 2.0.12 Update   1.0   [ Удаление мода ]
44.   Order Stickied Topics   1.01   [ Удаление мода ]
45.   Post and PM Inline Attachments   4.14   [ Удаление мода ]

MoonCat


MoonCat

I found the issue. It was modifications introduced by 2.0.18 update into my Mobile Theme (Themes/SMFMobileTheme/Search.template.php). Reverting back to pre-2.0.18 fixed the issue.

Kindred

It would be better to fix the theme rather than undo the update
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MoonCat

Thank you, Kindred. Here is the diff. 2.0.18 leaves '0' behind. Fixed.

@@ -186,8 +189,8 @@ function template_results()
                        {
                                echo '
                        <div class="search_results_posts">
-                               <div class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
-                                       <span class="topslice"><span></span></span>
+                               <div class="', empty($message['alternate']) 0 ? 'windowbg' : 'windowbg2', ' core_posts">
+                                       <span class="topslice"><span></span></span>
                                        <div class="content">
                                                <div class="counter">', $message['counter'], '</div>
                                                <div class="topic_details">

Kindred

according to the patch file...
Operation #2
Code (Find) Select

<div class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
<span class="topslice"><span></span></span>

Code (Replace With) Select


<div class="', empty($message['alternate']) ? 'windowbg' : 'windowbg2', ' core_posts">
<span class="topslice"><span></span></span>



I see no way that a random "0" would be "left behind" (but it does explain the error)

So, do the actual change to your theme and you should be good.


Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: