mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-26 18:10:11 +00:00
Merge pull request #174 from alikon/patch-3
PHP 7 error when save a weblink
This commit is contained in:
commit
6cd0429107
@ -10,7 +10,6 @@
|
|||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
use Joomla\Registry\Registry;
|
use Joomla\Registry\Registry;
|
||||||
use Joomla\String\String;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Weblinks model.
|
* Weblinks model.
|
||||||
@ -325,10 +324,10 @@ class WeblinksModelWeblink extends JModelAdmin
|
|||||||
{
|
{
|
||||||
if ($name == $table->title)
|
if ($name == $table->title)
|
||||||
{
|
{
|
||||||
$name = String::increment($name);
|
$name = JString::increment($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
$alias = String::increment($alias, 'dash');
|
$alias = JString::increment($alias, 'dash');
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($name, $alias);
|
return array($name, $alias);
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
use Joomla\String\String;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Weblink Table class
|
* Weblink Table class
|
||||||
*
|
*
|
||||||
@ -178,7 +176,7 @@ class WeblinksTableWeblink extends JTable
|
|||||||
{
|
{
|
||||||
// Array of characters to remove
|
// Array of characters to remove
|
||||||
$bad_characters = array("\n", "\r", "\"", "<", ">");
|
$bad_characters = array("\n", "\r", "\"", "<", ">");
|
||||||
$after_clean = String::str_ireplace($bad_characters, "", $this->metakey);
|
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey);
|
||||||
$keys = explode(',', $after_clean);
|
$keys = explode(',', $after_clean);
|
||||||
$clean_keys = array();
|
$clean_keys = array();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user