Jump to:

1835 Posts in 1139 Topics by 554 members

Blog Module

SilverStripe Forums » Blog Module » [Warning] array_key_exists()

Discuss the Blog Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1199 Views
  • ropuch
    Avatar
    Community Member
    2 Posts

    [Warning] array_key_exists() Link to this post

    Hello,
    I'm fairly new to silverstripe and I've problem with installation of the blog module.
    My silverstripe installation directory is /var/www/silverstripe. I copied blog files into /var/www/silverstripe/blog.
    I tried to invoke http://localhost/silverstripe/dev/build?flush=1, which ended successfully as well as new installation with blog copied to the location mentioned before.
    The problem is that every time I try to access blog i get:
    [Warning] array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object
    on line 13 in /var/www/silverstripe/blog/lang/en_GB.php
    The contains of this fie begin with:
    <?php

    /**
    * English (United Kingdom) language pack
    * @package modules: blog
    * @subpackage i18n
    */

    i18n::include_locale_file('modules: blog', 'en_US');

    global $lang;

    if(array_key_exists('en_GB', $lang) && is_array($lang['en_GB'])) { // <- this is line 13
    $lang['en_GB'] = array_merge($lang['en_US'], $lang['en_GB']);
    } else {
    $lang['en_GB'] = $lang['en_US'];
    }

    This warning disallows me to use blog module - nothing else shows up (besides of callstack of course).
    Could somebody help me?
    My system is debian lenny.

    P.S.
    Sorry for my poor english.

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: [Warning] array_key_exists() Link to this post

    Hi.

    I had a similar problem some time ago.

    Change the line:

    i18n::include_locale_file('modules: blog', 'en_US');

    to this

    i18n::include_locale_file('blog', 'en_US');

    and give it another try.

    That worked for me.
    Cheers,
    Christian

  • ropuch
    Avatar
    Community Member
    2 Posts

    Re: [Warning] array_key_exists() Link to this post

    Actually I found out that blog module file on the website is not the recent one, although it's called "trunk". After installation of the newest one (from svn) everything works like a charm

    1199 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.