Possible bug: Cannot save parent class snippet
-
Hi Shea (@bungeshea),
I’ve found an issue with Code Snippets and you can decide if it’s a bug or just how things have to be. I created a very simple example that allows you to reproduce it in seconds.
Steps (using Code Snippets version 2.13.3):
1. Create a PHP snippet as follows:
class A {}
2. Give it a priority of 9 (necessary because it’s a parent class) and save it.
3. Create another PHP snippet:
class B extends A {}
4. Leave its priority at 10 and save it.
5. Go back to edit the first snippet.
6. No need to change anything, just click Save Changes.
7. See error (at the definition of the subclass):Fatal error: Class ‘A’ not found in <location>/wp-content/plugins/code-snippets/php/snippet-ops.php(361) : eval()’d code on line 1
Let me know if you need any more details.
Regards,
RobP.S. I get around it by editing the snippet in MySQLAdmin if I need to make a change to the parent class.
- The topic ‘Possible bug: Cannot save parent class snippet’ is closed to new replies.