The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I am getting this error whenever I do a search for a quote name in a mod I did a long time ago. It just started happening after I upgraded to 4.1.12 PL1 a few weeks back. The strange thing is I can edit quotes and do a "Find All Quotes" listing fine, but if I try to search for a quote name, I get the error. But not on all names. It seems to be sporadic.
The quotes are in the db, not a file. Does anyone have any idea why this is happening now when it was fine before? Quote:
|
#2
|
||||
|
||||
![]()
I've narrowed it down to the if ($numresults == 1) conditional from this code:
Code:
if ($numresults == 1) { $quote = $db->fetch_array($getquotes); exec_header_redirect("quote.php?" . $vbulletin->session->vars['sessionurl'] . "quoteid=" . $quote['quoteid'] . "&do=update"); } else if (!$numresults) { print_stop_message('no_quotes_matched_your_query'); } else { I only get the error if there is just one result. Any more than 1 result and everything works fine. Does anyone have any idea why it is doing this and how to fix it? |
#3
|
||||
|
||||
![]()
What happens if you modify it to <= or => rather than == ?
|
#4
|
||||
|
||||
![]()
No change. I tried that first. I did find a fix that works, however. I added this to the top of the page (above the <?php), so it now looks like this:
Code:
<? ob_start(); ?> <?php and this to the bottom of the page (below the ?>), so now it looks like this : Code:
?> <? ob_flush(); ?> And now the error is gone. I looked at the file in CPanel, but I couldn't see any UTF-8 BOM in the file at all, so I was stumped. |
#5
|
||||
|
||||
![]()
Doh!, i should have thought of that, you don't have to add it to the page though, it should be able to go in the plugin
![]() ![]() PHP Code:
|
#6
|
||||
|
||||
![]()
Well, it's a file for my quotes mod. It doesn't have any plugins. Like I said earlier, there was no BOM in the file so I have no idea what changed in vB 4.2.0 to start giving that error. My site did move to another server recently, but IIRC, it as showing that error after I upgraded and before the move. But the file is an older one. I think I am using the same code in it as I did for vb 3.5, but it has always worked fine except for the error.
|
#7
|
||||
|
||||
![]()
If it works regardless of the error just supress the erro, do you think its down to deprecated code?
|
#8
|
||||
|
||||
![]()
If it was deprecated code, you would think PHP would show that, I would think, wouldn't it?
|
#9
|
||||
|
||||
![]()
it depends whether the error reporting is set right for your version of php
![]() |
#10
|
||||
|
||||
![]()
I am on PHP 5.3.10 and MySQL Version 5.5.22-cll. This is what I am using in the file:
Code:
error_reporting(E_ALL & ~E_NOTICE); One thing has got me thinking though. It was something Paul said about UTF-8 BOM. My tables in the db are all set at: Code:
CHARSET=utf8 COLLATE=utf8_unicode_ci I'm wondering if that could be any part of that is going on. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|