Re: Re: #25158 [Ana->Csd]: Var_Dump raise a warning if found a resource
| From: | Stefan Neufeind | Date: | Wed, 20 Aug 2003 23:07:12 +0000 |
| Subject: | Re: Re: #25158 [Ana->Csd]: Var_Dump raise a warning if found a resource | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20189@lists.php.net to get a copy of this message | ||
In this case there was simply a new version v0.4 at:
http://pear.php.net/Var_Dump
If patches are applied but a new release has not yet been done, have
a look at the CVS (e.g. via web) for that project:
http://cvs.php.net/cvs.php/pear/
But the case with Var_Dump is that it's not in CVS (yet). So the best
way to get the changed version in this case is to grab the new v0.4.
More questions? If yes, maybe let's move this to private email.
Stefan
On 20 Aug 2003 at 15:26, Marcos Neves wrote:
> I'm new in reporting bugs, and don't know the process.
> After a patch is release, how can I download the new file?
> Do I have to apply the patch myself? And if I don't have access to the
> pear directory in my host server? or the auto pear update package
> download the patch from CVS? I'm confuse as you can see.
> <neufeind@php.net> escreveu na mensagem
> news:20030820085023.20733.qmail@rack1.php.net... > ID:
>
> 25158 > Updated by: neufeind@php.net > Reported By:
> maka3d at yahoo dot com dot br > -Status: Analyzed >
> +Status: Closed > Bug Type: PEAR related >
> Operating System: WIN XP > PHP Version: 4.3.2 > New Comment: >
> > Frederic Poeydomenge integrated my patch in the new release 0.4 > >
> > Previous Comments: >
> ----------------------------------------------------------------------
> -- > > [2003-08-19 17:29:11] neufeind@php.net > > see last comment -
> sorry > >
> ----------------------------------------------------------------------
> -- > > [2003-08-19 17:26:43] pear dot neufeind at speedpartner dot de
> > > In all other functions in this class expect _formatTableHTML the >
> variable itself is concatenated to other strings the type is >
> automagically typecasted to a string. > > Fixing this in function
> _formatTableHTML is easy: > > old:
> htmlspecialchars($array[VAR_DUMP_ARRAY_VALUE]) > new:
> htmlspecialchars((string) $array[VAR_DUMP_ARRAY_VALUE]) > > simply
> typecast yourself and everything works fine. > > If you want to do it
> the elegant way you could test if > $array[VAR_DUMP_ARRAY_VALUE]
> is_object and in that case do a >
> get_class($array[VAR_DUMP_ARRAY_VALUE]). But since this is done >
> automatically by PHP and it's handled the same way >
> (auto-type-conversion) in other parts of this class, too, simply >
> typecasting to string seems to work fine. > >
> ----------------------------------------------------------------------
> -- > > [2003-08-19 16:48:22] maka3d at yahoo dot com dot br > >
> Description: > ------------ > Var_Dump raise a warning at line 750 of
> var_dump.php file > if the display function found a resource using >
> VAR_DUMP_DISPLAY_MODE_HTML_TABLE > > Reproduce code: > ---------------
> > require_once 'Var_Dump.php'; > $resource =
> mysql_pconnect('localhost','root',''); > >
> Var_Dump::display(
> $resource ); // this works > > Var_Dump::display( $resource , '' ,
> VAR_DUMP_DISPLAY_MODE_HTML_TABLE); > // this doesn't work > > Expected
> result: > ---------------- > write resource as the code without HTML
> do > > Actual result: > -------------- > WARNING: htmlspecialchars()
> expects parameter 1 to be string, resource > given > > >
> ----------------------------------------------------------------------
> -- > > > -- > Edit this bug report at
> http://bugs.php.net/?id=25158&edit=1 >
>
>
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>