Before you ask please READ THIS

Undefined constant error

Hi,

I use PhotoProof child theme. After last update every day have message in error_log. 1024 error lines from 09/20/2018 then on to today. Same error message

Latest line (every is same)
[25-Sep-2018 19:56:47 UTC] PHP Warning: Use of undefined constant A13FRAMEWORK_THEME_VER - assumed 'A13FRAMEWORK_THEME_VER' (this will throw an Error in a future version of PHP) in /home/XXX/public_html/wp-content/themes/photoproof-child-theme/functions.php on line 14


PHP version: 7.2

functions.php line from line 9 to 20 (bold is line 14)

//get current user.css dependencies
$user_css_deps = $wp_styles->registered['a13-user-css']->deps;

//register child theme style.css and add it with dependencies for user.css, to be sure it will be loaded after all other style files
//it is useful for doing easier style overwrites
wp_register_style('child-style', get_stylesheet_directory_uri(). '/style.css', $user_css_deps, A13FRAMEWORK_THEME_VER);

//add child theme style.css as also needed for user.css
array_push($wp_styles->registered['a13-user-css']->deps, 'child-style');
}
//register it later then parent theme styles
add_action('wp_enqueue_scripts', 'a13_child_style', 27);





Comments

  • AirAir
    Posts: 10,970
    Hey Robi:-)

    Sorry about this. I have already corrected this for the upcoming update, but it will be released next week.

    The story is I was renaming some constants that had no clear names.

    One of those was A13FRAMEWORK_THEME_VER so I have renamed it to A13FRAMEWORK_THEME_VERSION and changed every occurance of it in theme.

    After a few days I have noticed that this also appears in child theme, and as child theme does not receive any updates, I have added back old constant.

    So, to fix it(before the update) go to photoproof\advance\class-apollo13-framework.php and in line ~66 change
    define('A13FRAMEWORK_THEME_VERSION', '1.11.2');
    to
            define('A13FRAMEWORK_THEME_VERSION', '1.11.2');
            define('A13FRAMEWORK_THEME_VER', A13FRAMEWORK_THEME_VERSION );
    Sorry for any problems!

    With kind regards.
  • Posts: 115
    Thanks. Changed :)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!