Fixed the javascript in the new relation area. Fixed gh-294 that hade count not array errors. Added the option to over-ride the column name in the new relation area.

This commit is contained in:
2018-05-29 05:45:16 +02:00
parent f7be7ddad0
commit a7c3a6e8f2
16 changed files with 120 additions and 29 deletions

View File

@ -293,7 +293,7 @@ abstract class ###Component###Helper
}
}
// check if there are any view values remaining
if (count($_result))
if (count((array)$_result))
{
$_result = json_encode($_result);
$_result = array($_result);
@ -833,7 +833,7 @@ abstract class ###Component###Helper
**/
public static function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && count($array) > 0)
if (isset($array) && is_array($array) && count((array)$array) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@ -936,7 +936,7 @@ abstract class ###Component###Helper
{
$initial = strlen($string);
$words = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE);
$words_count = count($words);
$words_count = count((array)$words);
$word_length = 0;
$last_word = 0;