Title: fatal error script-loader.php
Last modified: June 2, 2022

---

# fatal error script-loader.php

 *  [Luciano Herrera](https://wordpress.org/support/users/lukyvan0211/)
 * (@lukyvan0211)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-script-loader-php-2/)
 * Hi,
    Everything was going well till the 6.0 wordpress update. My site crashed
   and is showing this error: Fatal error: Cannot redeclare wp_enqueue_block_style()(
   previously declared in /home/www/casadelparquecw.com/lukyvan0211/wp-includes/
   script-loader.php:2937) in /home/www/casadelparquecw.com/lukyvan0211/wp-includes/
   blocks.php on line 1206
 * Tried disabling all plugins, disabling astra theme, didn’t worked.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-script-loader-php-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [gotgotf](https://wordpress.org/support/users/gotgotf/)
 * (@gotgotf)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-script-loader-php-2/#post-15703572)
 * Do you have the “wp_enqueue_block_style()” function in your function.php file
   or elsewhere?
 * To be sure, you can load the default WP theme and check if you still have the
   error.
 * It’s strange, there is no “wp_enqueue_block_style()” function in blocks.php normally.
   
   Source : [https://github.com/WordPress/WordPress/blob/master/wp-includes/blocks.php#L1206](https://github.com/WordPress/WordPress/blob/master/wp-includes/blocks.php#L1206)
    -  This reply was modified 3 years, 11 months ago by [gotgotf](https://wordpress.org/support/users/gotgotf/).
    -  This reply was modified 3 years, 11 months ago by [gotgotf](https://wordpress.org/support/users/gotgotf/).
    -  This reply was modified 3 years, 11 months ago by [gotgotf](https://wordpress.org/support/users/gotgotf/).
    -  This reply was modified 3 years, 11 months ago by [gotgotf](https://wordpress.org/support/users/gotgotf/).
 *  Thread Starter [Luciano Herrera](https://wordpress.org/support/users/lukyvan0211/)
 * (@lukyvan0211)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-script-loader-php-2/#post-15703850)
 * “wp_enqueue_block_style()” function is not called on function.php file.
    fixed
   the error temporarily by removing the function from blocks.php and commenting
   this lines in index.php file from blocks folder:
 * //require ABSPATH . WPINC . ‘/blocks/comment-reply-link.php’;
    //require ABSPATH.
   WPINC . ‘/blocks/comment-template.php’; //require ABSPATH . WPINC . ‘/blocks/
   query-no-results.php’; //require ABSPATH . WPINC . ‘/blocks/read-more.php’;
 *  [Ville Perkkio](https://wordpress.org/support/users/vilu85/)
 * (@vilu85)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-script-loader-php-2/#post-15786314)
 * “It’s strange, there is no “wp_enqueue_block_style()” function in blocks.php 
   normally.”
    Actually there is, but it’s in version 5.9:
 * [https://github.com/WordPress/WordPress/blob/6437203f0997da70714a6c4ff9cdcd96cc6ddf8f/wp-includes/blocks.php#L1206](https://github.com/WordPress/WordPress/blob/6437203f0997da70714a6c4ff9cdcd96cc6ddf8f/wp-includes/blocks.php#L1206)
 * I had a same issue and I think it’s because your WordPress installation has version
   5.9 and 6.0 mixed together for some reason. In my case it happened because I 
   tried to restore earlier backup (5.9) after upgrading to 6.0.
 *  [kamalb](https://wordpress.org/support/users/kamalb/)
 * (@kamalb)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-script-loader-php-2/#post-16156965)
 * Hello,
    Hope you’re all well. I came across this post, as I was browsing for 
   some help. I upgraded to the lastest WP version, upgraded tp PHP 8.1 and I am
   now stuck with this message : Fatal error: Array and string offset access syntax
   with curly braces is no longer supported in /homepages/25/d584099293/htdocs/clickandbuilds/
   X3DGROUP/wp-includes/script-loader.php on line 706
 * My websmater is away on vacation this week and I’d appreciate some help here.
   
   Thanks
 * Kamal

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

The topic ‘fatal error script-loader.php’ is closed to new replies.

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [redeclare](https://wordpress.org/support/topic-tag/redeclare/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [kamalb](https://wordpress.org/support/users/kamalb/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-script-loader-php-2/#post-16156965)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
