[pLog-svn] r1827 - plog/branches/plog-1.0.1/class/locale
Jon Daley
plogworld at daley.snurgle.org
Wed Apr 13 10:39:59 GMT 2005
Well, I discovered (at least on one site) why I was getting the
error. I had removed a plugin, and hadn't yet gone back to the plugin
center and refreshed the display, so there was a plugin that was
installed, but didn't exist, and so mergeLocale was being passed a null
pointer.
I still have a problem on my regular site, my guess is my
half-ported blogstatistics plugin.
On Wed, 13 Apr 2005 jondaley at devel.plogworld.net wrote:
> Author: jondaley
> Date: 2005-04-13 10:23:49 +0000 (Wed, 13 Apr 2005)
> New Revision: 1827
>
> Modified:
> plog/branches/plog-1.0.1/class/locale/locale.class.php
> Log:
> fixed run-time error. due to plugin not having locale. Please check this fix, as this is a new part of the code for me. It no longer crashes my plog, but I am not sure what this merge code is doing
>
> Modified: plog/branches/plog-1.0.1/class/locale/locale.class.php
> ===================================================================
> --- plog/branches/plog-1.0.1/class/locale/locale.class.php 2005-04-12 17:22:44 UTC (rev 1826)
> +++ plog/branches/plog-1.0.1/class/locale/locale.class.php 2005-04-13 10:23:49 UTC (rev 1827)
> @@ -521,13 +521,17 @@
> */
> function mergeLocale( $locale )
> {
> - // load the file if it hadn't been loaded yet
> - if( !is_array($this->_messages))
> - $this->_loadLocaleFile();
> + if(isset($locale)){
> + // load the file if it hadn't been loaded yet
> + if( !is_array($this->_messages))
> + $this->_loadLocaleFile();
>
> - $this->_messages = array_merge( $this->_messages, $locale->getStrings());
> -
> - return true;
> + $this->_messages = array_merge( $this->_messages, $locale->getStrings());
> + return true;
> + }
> + else{
> + return false;
> + }
> }
> }
> ?>
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>
**************************************************************
* Jonathan M. Daley * One might say that people who *
* jondaley at snurgle.org * oversee things have a gift of *
* www.snurgle.org/~jondaley * oversight. *
**************************************************************
More information about the pLog-svn
mailing list