ThemeFuse / Unyson

A WordPress framework that facilitates the development of WP themes
http://unyson.io
923 stars 219 forks source link

Error on top of WP site: Cannot modify header information #4319

Open giancgiu opened 12 months ago

giancgiu commented 12 months ago

Hello

When I enter the site name of my WP page it generates an error message on top of the site like:


Deprecated: Creation of dynamic property FW_Option_Type_Icon_v2::$favorites is deprecated in /home/httpd/vhosts/word-it.ch/httpdocs/wp-content/plugins/unyson/framework/includes/option-types/icon-v2/class-fw-option-type-icon-v2.php on line 29

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/word-it.ch/httpdocs/wp-content/plugins/unyson/framework/includes/option-types/icon-v2/class-fw-option-type-icon-v2.php:29)

in /home/httpd/vhosts/word-it.ch/httpdocs/wp-admin/includes/misc.php on line 1431 Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/word-it.ch/httpdocs/wp-content/plugins/unyson/framework/includes/option-types/icon-v2/class-fw-option-type-icon-v2.php:29)

in /home/httpd/vhosts/word-it.ch/httpdocs/wp-includes/functions.php on line 6896 Warning: session_start(): Session cannot be started after headers have already been sent in /home/httpd/vhosts/word-it.ch/httpdocs/wp-content/plugins/unyson/framework/includes/hooks.php on line 229

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/word-it.ch/httpdocs/wp-content/plugins/unyson/framework/includes/option-types/icon-v2/class-fw-option-type-icon-v2.php:29) in /home/httpd/vhosts/word-it.ch/httpdocs/wp-admin/admin-header.php on line 9


Can somebady help on this matter?

Thanks in advance Giulio

giancgiu commented 12 months ago
public function _init() {
    /**
     * CSS for each pack is not loaded by default in frontend.
     *
     * You should load it by yourself in your theme, like this:
     *
     * fw()->backend->option_type('icon-v2')->packs_loader->enqueue_frontend_css()
     */
    $this->packs_loader = new FW_Icon_V2_Packs_Loader();

    if (! is_admin()) { return; }

    $this->favorites = new FW_Icon_V2_Favorites_Manager();   /that's line 29