Customizing SMF > SMF Coding Discussion

Help please!! Parse error!

(1/1)

K_4_kelly:
i suddenly got this error..
please help! thanks!

Parse error: parse error, unexpected T_STRING, expecting ')' in /home/mywalker/public_html/forum/Sources/Subs.php on line 3498

below are the codes on line3498

--- Code: --- $clean_name = strtr($clean_name, array('? => 'TH', '? => 'th', '? => 'DH', '? => 'dh', '? => 'ss', '? => 'OE', '? => 'oe', '? => 'AE', '? => 'ae', '? => 'u'));
--- End code ---

kegobeer:

--- Code: ---$clean_name = strtr($clean_name, array('?' => 'TH', '?' => 'th', '?' => 'DH', '?' => 'dh', '?' => 'ss', '?' => 'OE', '?' => 'oe', '?' => 'AE', '?' => 'ae', '?' => 'u'));
--- End code ---

However, your strtr function won't do much, since all question marks will be replaced with TH.  If you have a string "??????", you will get "THTHTHTHTHTH".

I think your line should be this:


--- Code: ---$clean_name = strtr($clean_name, array('Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh', 'ß' => 'ss', 'Œ' => 'OE', 'œ' => 'oe', 'Æ' => 'AE', 'æ' => 'ae', 'µ' => 'u'));

--- End code ---

K_4_kelly:
hi kegobeer,

thanks for your help!
after i replaced the code,  it shows

Can't open file: 'smf_log_online.MYI'. (errno: 145)
File: /home/mywalker/public_html/forum/Sources/Subs.php
Line: 2584

there's the code on line 2584


--- Code: --- WHERE " . ($do_delete ? "logTime < NOW() - INTERVAL " . ($modSettings['lastActive'] * 60) . ' SECOND' : '') . ($do_delete && !empty($ID_MEMBER) ? ' OR ' : '') . (empty($ID_MEMBER) ? '' : "ID_MEMBER = $ID_MEMBER"), __FILE__, __LINE__);
--- End code ---

any idea?
thanks a lot!!

K_4_kelly:
hi hi !!

the problem have been solved!

i searched the community and got some useful post! and i just repair the mysql

http://www.simplemachines.org/community/index.php?topic=88024.0

thanks!!

Navigation

[0] Message Index

Go to full version