Compatibility issue with Duplicate Post plugin
-
Hi Takayuki,
I have a small bugfix request. I have a website with both Contact Form 7 and Duplicate Post plugin installed and every time I visit Contact Forms page in backend, I got PHP notices in debug log generated by Duplicate Post.
I digged into Duplicate Post code and found out that the notices are triggered, because
$_GET['post']
is set, but is empty in the same time. I wondered how is that even possible, because there is nopost=
argument in query string of backend URL. Then I found out that Contact Form 7 manipulates$_GET
array and insert this key – in current version (5.1.1) of Contact Form 7, this happens at line 325 inadmin/admin.php
:$_GET['post'] = isset( $_GET['post'] ) ? $_GET['post'] : '';
As a developer myself, I consider adding new items to
$_GET
array programmaticaly a bad practice, therefore I’m kindly asking you, not Enrico Battocchi (Duplicate Post author), to fix it. As far as I have seen related Contact Form 7 code, the assignment to$_GET['post']
can be easily avoided.I believe by fixing this, you will improve compatibility not only with Duplicate Post but potentially more plugins that expect
$_GET['post']
to be non-empty if present.
- The topic ‘Compatibility issue with Duplicate Post plugin’ is closed to new replies.