...

View Full Version : PB error.



flynch01
05-31-2007, 07:03 AM
I would post this on IPB forums. But it seems too be a simple syntax error.


420: if ( ! $post['post_title'] )
421: {
422: if ( $this->ipsclass->vars['post_showtext_notitle'] )
423: if(preg_match("#\[hide_me\](.+?)\[/hide_me\]#is", $post['post']))
424: {
425: if(in_array($this->ipsclass->member['id'], $this->allposters))
426: {
427: $post['post'] = preg_replace( "#\[hide_me\](.+?)\[/hide_me\]#is", "<{HIDE2}> \\1", $post['post'] );
428: }
429: else
430: {
431: $post['post'] = preg_replace( "#\[hide_me\](.+?)\[/hide_me\]#is", "<{HIDE1}>", $post['post'] );
432: }
433: } {
434: $post_text = $this->lib->parser->strip_all_tags( $post['post'] );
435:
436: if ( strlen($post_text) > 50 )
437: {
438: $post['post_title'] = substr( $post_text, 0, 50 ).'...';
439: $post['post_title'] = preg_replace( "/&#?(\w+)?;?\.\.\.$/", '...', $post['post_title'] );
440: }
441: else
442: {
443: $post['post_title'] = $post_text;
444: }
445:
446: if ( ! trim($post['post_title']) )
447: {
448: $post['post_title'] = 'RE: '.$this->topic['title'];
449: }
450: }
451: else
452: {
453: $post['post_title'] = 'RE: '.$this->topic['title'];
454: }
455: }

the error code is: Parse error: parse error, unexpected T_ELSE in func_topic_threaded.php on line 451

Whats wrong with it?

Fumigator
05-31-2007, 07:34 AM
It has no matching "if" statement. The closing bracket on line 450 is opened on line 433 but that entire block of code isn't part of an "if" statement so after that block of code executes it hits the "ELSE" and says "Huh? There's no "if" statement..."

flynch01
05-31-2007, 07:49 AM
So how do i fix that? Im a complete noob to PHP. I dont intend on learning. But my entire forum is ssscrewed.

matak
05-31-2007, 08:59 AM
422: if ( $this->ipsclass->vars['post_showtext_notitle'] ) {

missing { on line 422

oh and remove that opening bracket '{' on line 433



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum