Title: PHP error Spacious theme
Last modified: September 4, 2024

---

# PHP error Spacious theme

 *  [autoresource](https://wordpress.org/support/users/autoresource/)
 * (@autoresource)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-error-spacious-theme/)
 *     ```wp-block-code
       Hello,I have a problem with the theme and I get in hosting error log file the following errors[04-Sep-2024 17:35:17 UTC] PHP Deprecated:  Invalid characters passed for attempted conversion, these have been ignored in /home/tradesof/public_html/wp-content/themes/spacious/inc/functions.php on line 350[04-Sep-2024 17:35:17 UTC] PHP Deprecated:  Funcția spacious_options este considerată <strong>învechită</strong> începând cu versiunea 2.5.0. Folosește în locul ei get_theme_mod. in /home/tradesof/public_html/wp-includes/functions.php on line 6085[04-Sep-2024 17:35:17 UTC] PHP Deprecated:  Funcția spacious_options este considerată [04-Sep-2024 18:10:41 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/tradesof/public_html/wp-cron.php:30) in /home/tradesof/public_html/wp-content/plugins/wp-yandex-metrika/includes/class.ya-metrika-woocommerce.php on line 87and on and on the same error messagesI tried to fix the error code with CHAT GPT, it worked, the website was loading fast and ok but it created problem to my contact 7 pop up form which was not working any more to send customers data.ORIGINAL code on line 320:phpCopy code$int = hexdec( str_replace( '#', '', $hexstr ) );MODIFIED CODE with ChatGPTphpCopy code$hexstr = preg_replace('/[^0-9a-fA-F]/', '', $hexstr);if (strlen($hexstr) == 3) {    $hexstr = $hexstr[0] . $hexstr[0] . $hexstr[1] . $hexstr[1] . $hexstr[2] . $hexstr[2];} elseif (strlen($hexstr) != 6) {    $hexstr = '000000'; // Poți ajusta valoarea implicită dacă este necesar}$int = hexdec($hexstr);ORIGINAL CODE ON LINE 350:phpCopy code$hex = str_replace( '#', '', $hex );if ( strlen( $hex ) == 3 ) {    $hex = str_repeat( substr( $hex, 0, 1 ), 2 ) . str_repeat( substr( $hex, 1, 1 ), 2 ) . str_repeat( substr( $hex, 2, 1 ), 2 );}MODIFIED CODE with ChatGPTphpCopy code$hex = str_replace( '#', '', $hex );$hex = preg_replace('/[^0-9a-fA-F]/', '', $hex);if ( strlen( $hex ) == 3 ) {    $hex = str_repeat( substr( $hex, 0, 1 ), 2 ) . str_repeat( substr( $hex, 1, 1 ), 2 ) . str_repeat( substr( $hex, 2, 1 ), 2 );} elseif (strlen($hex) != 6) {    $hex = '000000'; // Poți ajusta valoarea implicită dacă este necesar}
       ```
   
 * Please help me to fix this error as the website is loading very hard because 
   of this errors.
 * Thank you,
   Alin Sbarnaure
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-error-spacious-theme%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Rohit](https://wordpress.org/support/users/rohitkc32/)
 * (@rohitkc32)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-error-spacious-theme/#post-18011992)
 * Hi [@autoresource](https://wordpress.org/support/users/autoresource/) ,
   It is
   not suggested that you make any changes to the theme’s core file, so I suggest
   you undo those changes first and try deactivating the plugins one by one to see
   if the issue gets resolved. Let me know if it helps or not, and I will get back
   to you.Regards!

Viewing 1 replies (of 1 total)

The topic ‘PHP error Spacious theme’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/spacious/1.9.12/screenshot.jpg)
 * Spacious
 * [Support Threads](https://wordpress.org/support/theme/spacious/)
 * [Active Topics](https://wordpress.org/support/theme/spacious/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/spacious/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/spacious/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Rohit](https://wordpress.org/support/users/rohitkc32/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/php-error-spacious-theme/#post-18011992)
 * Status: not resolved