Thread: Show Thread Enhancements - [AJAX] Post Thank You Hack
View Single Post
  #3219  
Old 10-10-2013, 07:17 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by artman_hacker View Post
i have 2 errors with vbulletin 4.2.2 :

Warning: Illegal string offset 'postid' in ./includes/functions_post_thanks.php on line 135

Warning: Illegal string offset 'post_thanks_amount' in ./includes/functions_post_thanks.php on line 141
See vBulletin 4.2.2 FULL has been released. - vBulletin Community Forum by Paul M.

Quote:
Some further information on error displays in 4.2.2 ;

As part of the php compliance changes, error reporting in 4.2.2 was fixed to take account of the new strict & deprecated errors added in php 5.x

A side effect of this is that old (existing) errors that were not showing up may also now get displayed.

All of the errors we encounter during testing were corrected, but there may be more.
If you encounter such an error, then please log it in the vB4 Jira project, so we are aware of it.


If you need to disable error displays, there are several methods, depending on your circumstances and technical ability.

1. Add this line to your php.ini file (production sites should run like this anyway)

Code:
display_errors = Off
2. If you cannot access your php.ini file, add this line near the top of your config.php

Code:
ini_set('display_errors', 'Off');
3. Use the option added in 4.2.2 to suppress messages if you have products or hooks in use that still generate errors.

Goto : Settings > Options > Plugin/Hook System and then set the "PHP Compatibility" setting to 'Yes'.

This will change the error reporting options within vBulletin on the first hook that is run.

If you have vBulletin Suite (i.e. Blogs / CMS) or you have the Panjo Product enabled, this setting will pretty much disable the Strict & Deprecated messages anywhere.

This is because all three of those products use the "init_startup" hook.

If you don’t actually have any of those running, you can create a dummy plugin yourself - use the "init_startup" hook, and just put a comment in the php section.

Code:
// Dummy Hook //
This will cause the option to suppress errors after init_startup has been called (which is at the start of almost all pages)


4. This is for those who feel comfortable with editing files.

In class_core.php locate lines 5683-5685

Code:
        case E_NOTICE:
            // Just ignore these completely //
        break;
Add lines for Deprecated and/or Strict errors as required ;

Code:
        case E_NOTICE:
        case E_STRICT:
        case E_DEPRECATED:
            // Just ignore these completely //
        break;
This will bypass the additional error reporting.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01490 seconds
  • Memory Usage 1,786KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete