Title: [Plugin: Prism Syntax Highlighter (detached)] Bug with handler.php
Last modified: August 20, 2016

---

# [Plugin: Prism Syntax Highlighter (detached)] Bug with handler.php

 *  Resolved [kriszani](https://wordpress.org/support/users/kriszani/)
 * (@kriszani)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-prism-syntax-highlighter-detached-bug-with-handlerphp/)
 * 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/](http://wordpress.org/extend/plugins/prism-detached/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [apfelbox](https://wordpress.org/support/users/apfelbox/)
 * (@apfelbox)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-prism-syntax-highlighter-detached-bug-with-handlerphp/#post-3092091)
 * 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](https://github.com/apfelbox/Prism-Detached/commit/46cc4136fef974f2a2a8197d36670ea57138e88f)
   and respectively in [svn607942](http://plugins.trac.wordpress.org/changeset/607942)
   and just released 1.4 containing this fix.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Prism Syntax Highlighter (detached)] Bug with handler.php’ is
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/prism-detached_090c0c.svg)
 * [Prism Syntax Highlighter (detached)](https://wordpress.org/plugins/prism-detached/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/prism-detached/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/prism-detached/)
 * [Active Topics](https://wordpress.org/support/plugin/prism-detached/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/prism-detached/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/prism-detached/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [apfelbox](https://wordpress.org/support/users/apfelbox/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-prism-syntax-highlighter-detached-bug-with-handlerphp/#post-3092091)
 * Status: resolved