Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > Pear
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 05-20-2007, 7:41 PM   #1
spaze
 
spaze's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Net_URL: default argument values override object properties in initialize()

Hello,

sorry for writing to the list, I tried to report this on the issue
tracker, but after submitting I got this message on the website:

| ERROR:
| Critical internal error: could not send email to your address
| <minehere>, please write a mail message to the <i>pear-dev</i>mailing
| list and report this problem with details. We apologize for the
| problem, your report will help us to fix it for future users: No such
| handle found, cannot send confirmation email

Anyway, I have found and fixed issue/bug with default argument values
overriding object properties in initialize() in the CVS sources of
Net_URL (running PHP 5.2.1 on Win32 with CVS version of Net_URL,
URL.php revision 1.45.)


Description:

Regarding the revision 1.45 of URL.php there's a showstopper in initialize():

In __construct() you set the object properties and then call the
initialize() method with no arguments:

$this->url = $url;
$this->useBrackets = $useBrackets;

$this->initialize();

But initialize() is declared with default argument values:

function initialize($url = null, $useBrackets = true)

and later you copy the arguments into object properties:

$this->useBrackets = $useBrackets;
$this->url = $url;

So the $url passed to the contructor is not taken into care and the
defaults are used. Plus sometimes you refer to the function argument
instead of the object property:

if (!preg_match('/^[a-z0-9]+:\/\//i', $url)) {

In previous revisions (i.e. stable 1.36) everything works fine.

Please find attached patch against 1.46 which fixes all the problems,
thanks for reviewing.


Test code:

require_once 'Net/URL.php';

$dsn = 'imap://foo:bar@mail.example.com:143/INBOX';
$net_url =& new Net_URL($dsn);
echo $net_url->host;


Expected result:

mail.example.com


Actual result:

localhost


Thanks.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 05-20-2007, 7:41 PM   #2
Justin Patrin
 
Justin Patrin's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PEAR-DEV] Net_URL: default argument values override object properties in initialize()

On 5/10/07, spaze <spaze-bugs@exploited.cz> wrote:
> Hello,
>
> sorry for writing to the list, I tried to report this on the issue
> tracker, but after submitting I got this message on the website:
>
> | ERROR:
> | Critical internal error: could not send email to your address
> | <minehere>, please write a mail message to the <i>pear-dev</i>mailing
> | list and report this problem with details. We apologize for the
> | problem, your report will help us to fix it for future users: No such
> | handle found, cannot send confirmation email
>
> Anyway, I have found and fixed issue/bug with default argument values
> overriding object properties in initialize() in the CVS sources of
> Net_URL (running PHP 5.2.1 on Win32 with CVS version of Net_URL,
> URL.php revision 1.45.)
>
>
> Description:
>
> Regarding the revision 1.45 of URL.php there's a showstopper in initialize():
>
> In __construct() you set the object properties and then call the
> initialize() method with no arguments:
>
> $this->url = $url;
> $this->useBrackets = $useBrackets;
>
> $this->initialize();
>
> But initialize() is declared with default argument values:
>
> function initialize($url = null, $useBrackets = true)
>
> and later you copy the arguments into object properties:
>
> $this->useBrackets = $useBrackets;
> $this->url = $url;
>
> So the $url passed to the contructor is not taken into care and the
> defaults are used. Plus sometimes you refer to the function argument
> instead of the object property:
>
> if (!preg_match('/^[a-z0-9]+:\/\//i', $url)) {
>
> In previous revisions (i.e. stable 1.36) everything works fine.
>
> Please find attached patch against 1.46 which fixes all the problems,
> thanks for reviewing.
>


Your patch didn't make it to the list. Try attaching it with a
text/plain mime type (.txt extension).


--
Justin Patrin
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 05-20-2007, 7:41 PM   #3
David Coallier
 
David Coallier's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PEAR-DEV] Net_URL: default argument values override object properties in initialize()

Also, since you are using PHP5, try upgrading to Net_URL2 which is the
PHP5 package.

On 5/10/07, Justin Patrin <papercrane@gmail.com> wrote:
> On 5/10/07, spaze <spaze-bugs@exploited.cz> wrote:
> > Hello,
> >
> > sorry for writing to the list, I tried to report this on the issue
> > tracker, but after submitting I got this message on the website:
> >
> > | ERROR:
> > | Critical internal error: could not send email to your address
> > | <minehere>, please write a mail message to the <i>pear-dev</i>mailing
> > | list and report this problem with details. We apologize for the
> > | problem, your report will help us to fix it for future users: No such
> > | handle found, cannot send confirmation email
> >
> > Anyway, I have found and fixed issue/bug with default argument values
> > overriding object properties in initialize() in the CVS sources of
> > Net_URL (running PHP 5.2.1 on Win32 with CVS version of Net_URL,
> > URL.php revision 1.45.)
> >
> >
> > Description:
> >
> > Regarding the revision 1.45 of URL.php there's a showstopper in initialize():
> >
> > In __construct() you set the object properties and then call the
> > initialize() method with no arguments:
> >
> > $this->url = $url;
> > $this->useBrackets = $useBrackets;
> >
> > $this->initialize();
> >
> > But initialize() is declared with default argument values:
> >
> > function initialize($url = null, $useBrackets = true)
> >
> > and later you copy the arguments into object properties:
> >
> > $this->useBrackets = $useBrackets;
> > $this->url = $url;
> >
> > So the $url passed to the contructor is not taken into care and the
> > defaults are used. Plus sometimes you refer to the function argument
> > instead of the object property:
> >
> > if (!preg_match('/^[a-z0-9]+:\/\//i', $url)) {
> >
> > In previous revisions (i.e. stable 1.36) everything works fine.
> >
> > Please find attached patch against 1.46 which fixes all the problems,
> > thanks for reviewing.
> >

>
> Your patch didn't make it to the list. Try attaching it with a
> text/plain mime type (.txt extension).
>
>
> --
> Justin Patrin
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--
David Coallier,
Founder & Software Architect,
Agora Production (http://agoraproduction.com)
51.42.06.70.18
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 05-20-2007, 7:41 PM   #4
David Coallier
 
David Coallier's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PEAR-DEV] Net_URL: default argument values override object properties in initialize()

Yes I see the problem, could you please open a new bug ?

On 5/10/07, David Coallier <davidc@php.net> wrote:
> Also, since you are using PHP5, try upgrading to Net_URL2 which is the
> PHP5 package.
>
> On 5/10/07, Justin Patrin <papercrane@gmail.com> wrote:
> > On 5/10/07, spaze <spaze-bugs@exploited.cz> wrote:
> > > Hello,
> > >
> > > sorry for writing to the list, I tried to report this on the issue
> > > tracker, but after submitting I got this message on the website:
> > >
> > > | ERROR:
> > > | Critical internal error: could not send email to your address
> > > | <minehere>, please write a mail message to the <i>pear-dev</i>mailing
> > > | list and report this problem with details. We apologize for the
> > > | problem, your report will help us to fix it for future users: No such
> > > | handle found, cannot send confirmation email
> > >
> > > Anyway, I have found and fixed issue/bug with default argument values
> > > overriding object properties in initialize() in the CVS sources of
> > > Net_URL (running PHP 5.2.1 on Win32 with CVS version of Net_URL,
> > > URL.php revision 1.45.)
> > >
> > >
> > > Description:
> > >
> > > Regarding the revision 1.45 of URL.php there's a showstopper in initialize():
> > >
> > > In __construct() you set the object properties and then call the
> > > initialize() method with no arguments:
> > >
> > > $this->url = $url;
> > > $this->useBrackets = $useBrackets;
> > >
> > > $this->initialize();
> > >
> > > But initialize() is declared with default argument values:
> > >
> > > function initialize($url = null, $useBrackets = true)
> > >
> > > and later you copy the arguments into object properties:
> > >
> > > $this->useBrackets = $useBrackets;
> > > $this->url = $url;
> > >
> > > So the $url passed to the contructor is not taken into care and the
> > > defaults are used. Plus sometimes you refer to the function argument
> > > instead of the object property:
> > >
> > > if (!preg_match('/^[a-z0-9]+:\/\//i', $url)) {
> > >
> > > In previous revisions (i.e. stable 1.36) everything works fine.
> > >
> > > Please find attached patch against 1.46 which fixes all the problems,
> > > thanks for reviewing.
> > >

> >
> > Your patch didn't make it to the list. Try attaching it with a
> > text/plain mime type (.txt extension).
> >
> >
> > --
> > Justin Patrin
> >
> > --
> > PEAR Development Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

>
>
> --
> David Coallier,
> Founder & Software Architect,
> Agora Production (http://agoraproduction.com)
> 51.42.06.70.18
>



--
David Coallier,
Founder & Software Architect,
Agora Production (http://agoraproduction.com)
51.42.06.70.18
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 05-20-2007, 7:41 PM   #5
spaze
 
spaze's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PEAR-DEV] Net_URL: default argument values override object properties in initialize()

Friday, May 11, 2007, 12:42:51 AM, you wrote:
> Yes I see the problem, could you please open a new bug ?


Here it comes: http://pear.php.net/bugs/11008

Thanks
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , , , , , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANNOUNCEMENT] Net_URL-1.0.15 (stable) Released. PEAR Announce Pear 0 05-20-2007 6:34 PM
[ANNOUNCEMENT] Net_URL-1.0.16 (stable) Released. PEAR Announce Pear 0 05-20-2007 6:34 PM
MDB2 column "object" does not exist brian Pear 2 05-20-2007 6:34 PM


Featured Websites




All times are GMT +1. The time now is 6:29 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98