Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missing letter in php-script
#1
GetSimple v2.0; admin/components.php, line 55:

I should think so, its right part of code:
Code:
$ct = 0; $coArray = array();
foreach ($ids as $id)
{
    if ( ($title[$ct] != null) && ($value[$ct] != null) )
    {
        if ( $slug[$ct] == null )
        {
            $slug_tmp = to7bit($title[$ct], 'UTF-8');
            $slug[$ct] = clean_url($slug_tmp);
            $slug_tmp = '';
        }
        
        $coArray[$ct]['id'] = $ids[$ct];
        $coArray[$ct]['title'] = htmlentities($title[$ct], ENT_QUOTES, 'UTF-8');
        $coArray[$ct]['slug'] = $slug[$ct];
        $coArray[$ct]['value'] = htmlentities($value[$ct], ENT_QUOTES, 'UTF-8');
    }
    $ct++;
}

before:
Code:
$coArray[$ct]['id'] = $id[$ct];
Reply
#2
im not seeing it...
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#3
You not fixed it in 2.01!
Turn ON debug mode and you will see many errors in admin/component.php line 55
Reply
#4
OP, that should be $id[$ct] NOT $ids[$ct], see relevant code below.
Code:
foreach ($ids as $id)
...
                $coArray[$ct]['id'] = $id[$ct];
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#5
sal,

original script is correct.

$ids is the array,
$id is the value of the specific array item we are looping through.

See foreach staement

Code:
foreach ($ids as $id)

Regards, Mike.
My Github Repos: Github
Website: DigiMute
Reply
#6
I know, I was correcting OP.
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#7
aaah, now I see it..
Sorry about that.. Smile

Looks like

$coArray[$ct]['id']

isn't used anyway so doesn't make a difference, I'll fix it in the svn.

Thanks,
Mike.
My Github Repos: Github
Website: DigiMute
Reply
#8
thanks Mike and kirillaristov!
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply




Users browsing this thread: 1 Guest(s)