Permalink
Browse files

fix(actions): referrer path is now parsed correctly

substr() arguments were incorrect
  • Loading branch information...
hypeJunction committed Dec 27, 2015
1 parent 548f9e2 commit 6b1bfe2631b1c367252e6feb967b63211527b098
Showing with 1 addition and 1 deletion.
  1. +1 −1 actions/entity/delete.php
@@ -40,7 +40,7 @@
$referrer_url = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$site_url = elgg_get_site_url();
if ($referrer_url && 0 == strpos($referrer_url, $site_url)) {
$referrer_path = substr($referrer_url, 0, strlen($site_url));
$referrer_path = substr($referrer_url, strlen($site_url));
$segments = explode('/', $referrer_path);
if (in_array($guid, $segments)) {
// referrer URL contains a reference to the entity that will be deleted

0 comments on commit 6b1bfe2

Please sign in to comment.