[Pmwiki-users]I got following warning after install of 0.6.1

Patrick R. Michaud pmichaud
Mon Feb 23 08:02:59 CST 2004


On Mon, Feb 23, 2004 at 02:17:37PM +0100, Runar Oudmayer wrote:
> After I installed 0.6.1 it gives me the following error (I am running PGP
> 4.3.3 test environment):
> 
> Warning: Call-time pass-by-reference has been deprecated - argument passed
> by value; If you would like to pass it by reference, modify the declaration
> of array_push(). If you would like to enable call-time pass-by-reference,
> you can set allow_call_time_pass_reference to true in your INI file.
> However, future versions may not support this any longer. in
> g:\web\work\pmwiki\scripts\tlayout.php on line 50

Very strange.  Attached is a modified version of scripts/tlayout.php, could
you copy it onto your system and see if it works?  All of my installations
of PHP have allow_call_time_pass_reference set to true by default and
it's not easy for me to change it at the moment...

If this version works then I'll make it the default in pmwiki-0.6.2.

Pm
-------------- next part --------------
<?php
/*  Copyright 2004 Patrick R. Michaud (pmichaud at pobox.com)
    This file is part of PmWiki; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published
    by the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.  See pmwiki.php for full details.

    This module sets the values of $PageStartFmt and $PageEndFmt,
    used by various modules to generate output pages.  The general
    mechanism for page output is that a function such as HandleBrowse
    or HandleEdit will output the value of $PageStartFmt, followed
    by the action-specific content, followed by $PageEndFmt.  The
    HTML comment <!--PageText--> in the template file denotes the
    location where $PageStart ends and $PageEnd begins.

    The template file may also contain HTML comments of the form
    <!--PageHeaderFmt-->, <!--PageFooterFmt-->, etc.  These
    have the side effect of putting the strings that follow into
    the variables $PageHeaderFmt, $PageFooterFmt, etc. and then
    placing references to those variables into $PageStartFmt or 
    $PageEndFmt.  This allows HandleBrowse and other functions to
    selectively disable headers and footers by setting the corresponding
    variable to the empty string.
*/

SDV($PageLogoUrl,"$PubDirUrl/skins/pmwiki/pmwiki-32.gif");
SDV($PageTemplateFmt,"pub/skins/pmwiki/pmwiki.tmpl");

if (!$PageTemplateFmt) return;

SDV($BasicLayoutVars,array('PageHeaderFmt','PageLeftFmt','PageTitleFmt',
  'PageText','PageRightFmt','PageFooterFmt'));

$sect = preg_split('/<!--(Page(?:Text|[A-Za-z]+Fmt))-->/',
  implode('',file(FmtPageName($PageTemplateFmt,$pagename))),0,
  PREG_SPLIT_DELIM_CAPTURE);
$PageStartFmt = array_merge('headers:',
  preg_split('/<!--((?:wiki|file|function):.*?)-->/',array_shift($sect),
    0,PREG_SPLIT_DELIM_CAPTURE));
$PageEndFmt = array();
$ps = 'PageStartFmt';
while (count($sect)>0) {
  $k = array_shift($sect);
  $v = preg_split('/<!--((?:wiki|file|function):.*?)-->/',
    array_shift($sect),0,PREG_SPLIT_DELIM_CAPTURE);
  $GLOBALS[$k] = (count($v)>1) ? $v : $v[0];
  if (in_array($k,$BasicLayoutVars)) {
    $GLOBALS[$ps][] = "<!--$k-->";
    if ($k=='PageText') { $ps = 'PageEndFmt'; }
    $GLOBALS[$ps][] =& $GLOBALS[$k];
  }
}
array_push($PageStartFmt,"\n<div id='wikitext'>\n");
array_unshift($PageEndFmt,'</div>');

?>


More information about the pmwiki-users mailing list