Quote:
Originally Posted by Marcus_Fenix
Hi,
We've got a problem with the image resizer on our forum. I wanted to set the size a little lower than 650 pixels, but when I tried to change it to 600 pixels. I got this error:
Fatal error: Call to a member function query_write() on a non-object in /var/www/includes/adminfunctions_options.php(490) : eval()'d code on line 64
The funny thing is that I can change it to a higher value and now it?s up to 700 pixels... oops
Any clues?
Using vbulletin 3.7.1
|
Quote:
Originally Posted by ALil'Hope
Fatal error: Call to a member function query_write() on a non-object in /public_html/forums/includes/adminfunctions_options.php(490) : eval()'d code on line 11
|
In order to fix the Fatal Error do the following:
Open the xml product file.
Search for:
Code:
<plugin active="1" executionorder="5">
<title>nCode Image Resizer: Enforce Maximum Dimensions</title>
<hookname>admin_options_processing</hookname>
<phpcode><![CDATA[if($vbulletin->GPC['setting']['ncode_imageresizer_useroptions'] == 'maxdimensions') {
if($oldsetting['varname'] == 'ncode_imageresizer_maxwidth' && $oldsetting['value'] > intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']) && intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']) > 0) {
$db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxwidth` = '.intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']));
} elseif($oldsetting['varname'] == 'ncode_imageresizer_maxheight' && $oldsetting['value'] > intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']) && intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']) > 0) {
$db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxheight` = '.intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']));
}
}
if($vbulletin->GPC['setting']['ncode_imageresizer_clearusersettings'] == '1') {
$vbulletin->GPC['setting']['ncode_imageresizer_clearusersettings'] = '0';
db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxheight` = NULL, `ncode_imageresizer_maxheight` = NULL, `ncode_imageresizer_maxwidth` = NULL, `ncode_imageresizer_mode` = NULL WHERE 1');
}]]></phpcode>
</plugin>
Replace with:
Code:
<plugin active="1" executionorder="5">
<title>nCode Image Resizer: Enforce Maximum Dimensions</title>
<hookname>admin_options_processing</hookname>
<phpcode><![CDATA[if($vbulletin->GPC['setting']['ncode_imageresizer_useroptions'] == 'maxdimensions') {
if($oldsetting['varname'] == 'ncode_imageresizer_maxwidth' && $oldsetting['value'] > intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']) && intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']) > 0) {
$vbulletin->$db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxwidth` = '.intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']));
} elseif($oldsetting['varname'] == 'ncode_imageresizer_maxheight' && $oldsetting['value'] > intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']) && intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']) > 0) {
$vbulletin->$db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxheight` = '.intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']));
}
}
if($vbulletin->GPC['setting']['ncode_imageresizer_clearusersettings'] == '1') {
$vbulletin->GPC['setting']['ncode_imageresizer_clearusersettings'] = '0';
$vbulletin->db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxheight` = NULL, `ncode_imageresizer_maxwidth` = NULL, `ncode_imageresizer_mode` = NULL WHERE 1');
}]]></phpcode>
</plugin>