WordPress.org

Forums

Prism Syntax Highlighter (detached)
[resolved] Bug with handler.php (2 posts)

  1. kriszani
    Member
    Posted 2 years ago #

    There is a bug in handler.php at least with my version of php

    Fatal error: Cannot access self:: when no class scope is active in /wp-content/plugins/prism-detached/lib/Prism/Detached/Shortcode/Handler.php on line 125

    I changed self to Prism_Detached_Shortcode_Handler and it seems to work ok.
    I'm running PHP Version 5.3.2-1ubuntu4.18

    public static function register ()
        {
            add_shortcode('prism',
                function ($attributes)
                {
                    //$shortCode = new self($attributes);
    	        $shortCode = new Prism_Detached_Shortcode_Handler($attributes);
                    return $shortCode->handle();
                }
            );
        }

    http://wordpress.org/extend/plugins/prism-detached/

  2. apfelbox
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thank you for your feedback. That is correct, it is only working in PHP >= 5.4 (which is my development platform, so it must have slipped through).

    I fixed the problem in 46cc4136fe and respectively in svn607942 and just released 1.4 containing this fix.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Prism Syntax Highlighter (detached)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.