• I’m getting tons of notices and warnings in the plugin. Due to the older style of PHP code in the plugin, here are some of the notices I’m getting:

    • Notice: Use of undefined constant wpptopdf – assumed ‘wpptopdf’ in /var/www/html/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 40 – Fixable by changing if (!class_exists(wpptopdf)) { to if (!class_exists('wpptopdf')) {
    • Notice: Undefined index: format in /var/www/html/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 121 – Fixable by changing if ('pdf' == $_GET['format']) { to if (isset($_GET['format']) and ('pdf' == $_GET['format'])) {
    • Notice: Undefined index: nonPublic in /var/www/html/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 122 – Fixable by changing if ($this->options['nonPublic'] and !is_user_logged_in()) to if (isset($this->options['nonPublic']) and !is_user_logged_in())
    • Notice: Undefined index: otherPlugin in /var/www/html/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 269
    • Notice: Undefined index: onSingle in /var/www/html/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 386 – Fixable by changing if ($this->options['onSingle'] and !(is_single() or is_page())) to if (isset($this->options['onSingle']) and !(is_single() or is_page()))
    • Notice: Undefined index: format in /var/www/html/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 390 – Fixable the same way.
    • Notice: Undefined index: query in /var/www/html/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 411 – Fixable similarly.

    The generation of a PDF also results in a bunch of similar warnings, like a deprecated use of get_bloginfo. Viewing admin pages results in has_cap deprecation warnings.

    I’d also recommend mentioning the requirement of the mbstring PHP extension — it’s a nonstandard extension.

    If your code is open source (on github or Google code or something similar), I’d be happy to hop in and clean up the warnings, as I’ve had to do so manually on the site I’m working on. Just send me the project URL.

    https://www.ads-software.com/extend/plugins/wp-post-to-pdf/

Viewing 1 replies (of 1 total)
  • Plugin Author Neerav D.

    (@n33rav)

    Thanks Mellisa for posting it! It will be fixed in next release.

    I should have tested with Debug mode ??

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Post to PDF] Notices and errors’ is closed to new replies.