Title: Blog Crashed with Parse error: syntax error
Last modified: August 31, 2016

---

# Blog Crashed with Parse error: syntax error

 *  [bernyramirez](https://wordpress.org/support/users/bernyramirez/)
 * (@bernyramirez)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/)
 * Apparently my blog crashed down!
 * I receive this message when I try to enter:
 * Parse error: syntax error, unexpected T_FUNCTION in /home/content/18/5019418/
   html/blog/wp-content/themes/photolab/inc/tools.php on line 28
 * It happened when I updated photolab theme.
 * What can I do??
 * This is the link to my blog: [blog.bernardoramirez.net](http://blog.bernardoramirez.net)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [lisa](https://wordpress.org/support/users/contentiskey/)
 * (@contentiskey)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417011)
 * can you access your webhosting file manager or FTP?
    do you have a backup of 
   your website database and files?
 *  Thread Starter [bernyramirez](https://wordpress.org/support/users/bernyramirez/)
 * (@bernyramirez)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417014)
 * Yes I can, using ftp I can see my files
 *  Thread Starter [bernyramirez](https://wordpress.org/support/users/bernyramirez/)
 * (@bernyramirez)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417022)
 * I can’t enter using ftp or anything, I don’t know what’s happening… please help…
 *  Thread Starter [bernyramirez](https://wordpress.org/support/users/bernyramirez/)
 * (@bernyramirez)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417023)
 * I don’t have any backup
 *  Thread Starter [bernyramirez](https://wordpress.org/support/users/bernyramirez/)
 * (@bernyramirez)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417024)
 * Finally I could enter using ftp, what can I do??
 *  [Clarion Technologies](https://wordpress.org/support/users/clarionwpdeveloper/)
 * (@clarionwpdeveloper)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417026)
 * Hi,
 * can you please paste the code of your following file.
 * /home/content/18/5019418/html/blog/wp-content/themes/photolab/inc/tools.php
 * Thanks
 *  Thread Starter [bernyramirez](https://wordpress.org/support/users/bernyramirez/)
 * (@bernyramirez)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417027)
 * <?php
 * class Tools{
 *  /**
    * Join array to string * [@param](https://wordpress.org/support/users/param/)
   array $arr — array like ‘key’ => ‘value’ * [@return](https://wordpress.org/support/users/return/)
   string — joined string */ public static function join($arr = array()) { $arr 
   = self::removeEmpty($arr); $result = array(); foreach ($arr as $key => $value){
   $result[] = sprintf(‘%s=”%s”‘, $key, $value); } return implode(‘ ‘, $result);}
 *  /**
    * Remove empty elements * [@param](https://wordpress.org/support/users/param/)
   array $arr — array with empty elements * [@return](https://wordpress.org/support/users/return/)
   array — array without empty elements */ public static function removeEmpty($arr){
   return array_filter($arr, function($var) { return $var != ”; }); }
 *  /**
    * Lave just right keys in array * [@param](https://wordpress.org/support/users/param/)
   array $right_keys — right keys array * [@param](https://wordpress.org/support/users/param/)
   array $arr — array to sanitize * [@return](https://wordpress.org/support/users/return/)
   array — sanitized array */ public static function leaveRightKeys($right_keys,
   $arr) { if(count($arr)) { foreach ($arr as $key => $value) { if(!in_array($key,
   $right_keys)) unset($arr[$key]); } } return $arr; }
 *  /**
    * Leave keys from array * [@param](https://wordpress.org/support/users/param/)
   array $remove_keys — kyes to remove * [@param](https://wordpress.org/support/users/param/)
   array $arr — array from we need remove these keys * [@return](https://wordpress.org/support/users/return/)
   array — sanitized array */ public static function removeKeys($remove_keys, $arr){
   if(count($remove_keys)) { foreach ($remove_keys as $key => $value) { if(array_key_exists(
   $value, $arr)) unset($arr[$value]); } } return $arr; }
 *  /**
    * Get key or return empty string * [@param](https://wordpress.org/support/users/param/)
   string $key — key name * [@param](https://wordpress.org/support/users/param/)
   array $arr — array to check key * [@param](https://wordpress.org/support/users/param/)
   mixed $default — default value * [@return](https://wordpress.org/support/users/return/)
   mixed — key */ public static function tryGet($key, $arr, $default = ”) { if(array_key_exists(
   $key, $arr)) return $arr[$key]; return $default; }
 *  /**
    * Render your view * [@param](https://wordpress.org/support/users/param/)
   string $view_name — view name * [@param](https://wordpress.org/support/users/param/)
   array $variables — variables to extract in rendering View * [@return](https://wordpress.org/support/users/return/)
   string — HTML code */ public static function renderView($view_name, $variables
   = array()) { extract($variables); ob_start(); include sprintf(‘views/%s.php’,
   $view_name); return ob_get_clean(); }
 *  /**
    * Render select control * [@param](https://wordpress.org/support/users/param/)
   array $values — options for select ctrl * [@param](https://wordpress.org/support/users/param/)
   string $attributes — attributes to * [@return](https://wordpress.org/support/users/return/)
   string — HTML code */ public static function renderSelectControl($values, $attributes
   = array()) { $attributes = array_merge(array(‘value’ => ”), $attributes); return
   self::renderView( ‘select_control’, array( ‘attributes’ => $attributes, ‘values’
   => $values ) ); } }
 *  Thread Starter [bernyramirez](https://wordpress.org/support/users/bernyramirez/)
 * (@bernyramirez)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417028)
 * This is the line that says it’s wrong:
 *  return array_filter($arr, function($var) { return $var != ”; });
 *  [Clarion Technologies](https://wordpress.org/support/users/clarionwpdeveloper/)
 * (@clarionwpdeveloper)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417031)
 * Hi,
 * It seems to be a theme file and function. We cannot rectify or modify it on our
   own as we do not where it is used and what will be its effect after changing 
   it.
 * As the theme is Photolab I recommend you to open a support ticket on the theme
   forum so that the theme developer will be able to assist you properly than anybody
   here can.
 * [https://wordpress.org/support/theme/photolab](https://wordpress.org/support/theme/photolab)
 * Thanks
 *  Thread Starter [bernyramirez](https://wordpress.org/support/users/bernyramirez/)
 * (@bernyramirez)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417037)
 * Thank you for your help! I opened the support ticket right now.
 *  [Clarion Technologies](https://wordpress.org/support/users/clarionwpdeveloper/)
 * (@clarionwpdeveloper)
 * [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417040)
 * Welcome. 🙂

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Blog Crashed with Parse error: syntax error’ is closed to new replies.

## Tags

 * [crashed](https://wordpress.org/support/topic-tag/crashed/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 3 participants
 * Last reply from: [Clarion Technologies](https://wordpress.org/support/users/clarionwpdeveloper/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/blog-crashed-help/#post-7417040)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
