Closed abaney closed 5 years ago
Thank you for the report. It's odd that this warning is still showing up, I thought I already fixed it a while ago. Could it be that you have an older version of the code? Try downloading the latest release or the master branch.
Thanks for your response! I do have the latest version running. Does it help to diagnose knowing I'm running PHP 7.0.33?
Part of my issue was that I had the whole domain redirected, not excluding that one folder which contains the new / updated plugin version. I fixed this particular issue in the htaccess file.
Although I'm still getting the PHP error message I initially sent to you... my sites are now able to see that a new plugin version has been released.
I checked the contents of markdown.php
in the latest version and I don't see any classes using deprecated constructors. Can you check your copy of the file? What do the lines that were mentioned in the warnings (line 223 and 1696) actually look like? It's fine if you're not sure how to interpret those parts of the code; just copy 10 - 20 lines from both locations and post them here.
Thank you, Yahnis! from the markdown.php
file...
From line 223:
#
# Markdown Parser Class
#
class Markdown_Parser {
### Configuration Variables ###
# Change to ">" for HTML output.
var $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX;
var $tab_width = MARKDOWN_TAB_WIDTH;
# Change to `true` to disallow markup or entities.
var $no_markup = false;
var $no_entities = false;
# Predefined urls and titles for reference links and images.
var $predef_urls = array();
var $predef_titles = array();
### Parser Implementation ###
# Regex to match balanced [brackets].
# Needed to insert a maximum bracked depth while converting to PHP.
var $nested_brackets_depth = 6;
var $nested_brackets_re;
var $nested_url_parenthesis_depth = 4;
var $nested_url_parenthesis_re;
# Table of hash values for escaped characters:
var $escape_chars = '\`*_{}[]()>#+-.!';
var $escape_chars_re;
function __construct() {
...
From line 1696:
}
#
# Markdown Extra Parser Class
#
class MarkdownExtra_Parser extends Markdown_Parser {
### Configuration Variables ###
# Prefix for footnote ids.
var $fn_id_prefix = "";
# Optional title attribute for footnote links and backlinks.
var $fn_link_title = MARKDOWN_FN_LINK_TITLE;
var $fn_backlink_title = MARKDOWN_FN_BACKLINK_TITLE;
# Optional class attribute for footnote links and backlinks.
var $fn_link_class = MARKDOWN_FN_LINK_CLASS;
var $fn_backlink_class = MARKDOWN_FN_BACKLINK_CLASS;
# Optional class prefix for fenced code block.
var $code_class_prefix = MARKDOWN_CODE_CLASS_PREFIX;
# Class attribute for code blocks goes on the `code` tag;
# setting this to true will put attributes on the `pre` tag instead.
var $code_attr_on_pre = MARKDOWN_CODE_ATTR_ON_PRE;
# Predefined abbreviations.
var $predef_abbr = array();
### Parser Implementation ###
function __construct() {
...
Thank you. That code looks fine to me and it doesn't appear to use deprecated constructors. As you can see, the constructor method is called __construct
, so it doesn't actually have the same name as the class. To the best of my knowledge, __construct
is the correct constructor name for PHP 7.
I'm not sure why you're getting deprecation notices about method names that are not actually present in the code. Could it be than an older version of this file has been cached somewhere? Could you maybe try clearing the PHP opcode cache somehow?
That could be the issue. I can try contacting my host to see if they can clear the PHP opcode cache. Thank you for your help!
Below is the error message I got at the top of my JSON file when testing the file...using this URL: http://example.com/wp-update-server/?action=get_metadata&slug=example
Looks like the code in the ~/wp-update-server/includes/extension-meta/markdown.php file need to be updated. I don't know enough PHP how to fix this. Thank you!