Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: PB error.

  1. #1
    Regular Coder
    Join Date
    Mar 2007
    Posts
    357
    Thanks
    46
    Thanked 22 Times in 21 Posts

    PB error.

    I would post this on IPB forums. But it seems too be a simple syntax error.

    Code:
     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?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    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..."

  • #3
    Regular Coder
    Join Date
    Mar 2007
    Posts
    357
    Thanks
    46
    Thanked 22 Times in 21 Posts
    So how do i fix that? Im a complete noob to PHP. I dont intend on learning. But my entire forum is ssscrewed.

  • #4
    Banned
    Join Date
    Apr 2007
    Posts
    428
    Thanks
    29
    Thanked 5 Times in 5 Posts
    422: if ( $this->ipsclass->vars['post_showtext_notitle'] ) {
    missing { on line 422

    oh and remove that opening bracket '{' on line 433
    Last edited by matak; 05-31-2007 at 10:03 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •