Commit 07e71ab2 authored by haystack's avatar haystack

Test path more robustly - make sure of position of problematic string

parent 2a89418a
......@@ -1566,8 +1566,8 @@ class CiviCRM_For_WordPress {
// Fix 'civicrm/civicrm' elements derived from CRM:url()
// @see https://lab.civicrm.org/dev/rc/issues/5#note_16205
if (stristr($q, 'civicrm/civicrm') !== false) {
$q = str_replace('civicrm/civicrm', 'civicrm', $q);
if (substr($q, 0, 16) === 'civicrm/civicrm/') {
$q = str_replace('civicrm/civicrm/', 'civicrm/', $q);
$_REQUEST['q'] = $_GET['q'] = $q;
set_query_var( 'q', $q );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment