Permalink
Browse files

Resolve issue if $_SERVER['PHP_SELF'] is not set on server environment.

  • Loading branch information...
1 parent bcba8f0 commit 34d78fc076bd551284237ff4f2caa7c37c827ff1 @acidvertigo acidvertigo committed Aug 16, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 catalog/admin/includes/functions/html_output.php
  2. +1 −1 catalog/includes/functions/html_output.php
@@ -16,7 +16,7 @@ function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
$page = tep_output_string($page);
if ($page == '') {
- die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine the page link!<br /><br />Function used:<br /><br />tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</strong>');
+ $page = basename($HTTP_SERVER_VARS['PHP_SELF']);
}
if ($connection == 'NONSSL') {
$link = HTTP_SERVER . DIR_WS_ADMIN;
@@ -18,7 +18,7 @@ function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $ad
$page = tep_output_string($page);
if (!tep_not_null($page)) {
- die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine the page link!<br /><br />');
+ $page = basename($HTTP_SERVER_VARS['PHP_SELF']);
}
if ($connection == 'NONSSL') {

0 comments on commit 34d78fc

Please sign in to comment.