Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
alien73
Involved
Involved



Joined: Sep 15, 2008
Posts: 352

PostPosted: Sun Sep 27, 2009 10:09 am Reply with quote

I noticed the function ergi() is still being used in core which is fine for those not using php 5.3.0 +

ereg() — Regular expression match

Note: As of PHP 5.3.0 the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. It has been removed completely in Php 6.

Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg().
 
View user's profile Send private message Visit poster's website
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Sun Sep 27, 2009 10:58 am Reply with quote

We are aware. It still works in 5.3+ you just need to suppress the deprecated warning.

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
alien73







PostPosted: Sun Sep 27, 2009 11:08 am Reply with quote

We shouldn't have to suppress warnings but rid of them with the proper function that works will all versions of PHP like preg_match()
 
Palbin







PostPosted: Sun Sep 27, 2009 11:20 am Reply with quote

As i said we are aware and when time permits we will resolve the issue. ereg() still works in all stable releases of PHP, and all errors/warnings/notices should be suppressed on a "live" site.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sun Sep 27, 2009 11:23 am Reply with quote

alien73, just another bit of history... we were made aware of this just a week or so before our code freeze. Too much work to pull int 2.4. Its in Mantis and will be worked.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
alien73







PostPosted: Sun Sep 27, 2009 11:29 am Reply with quote

I brought it up because I will using the function in Alien Cart(tm) but then realized after not use it.. I then got curious and did some code browsing of the core...

No pun intended.
 
montego







PostPosted: Sun Sep 27, 2009 11:32 am Reply with quote

We could have as much as 639 instances of the ereg functions so hopefully you can understand the magnitude... Wink
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Sep 27, 2009 11:41 am Reply with quote

And, for the immediate future, we are still 4.x based. It's on our list as has been mentioned as well as some others.
 
View user's profile Send private message
alien73







PostPosted: Sun Sep 27, 2009 2:06 pm Reply with quote

I'm full ledge coding right now and studying the new ways along the way... It's a function I needed but after looking into it I decided to not use it since preg_match() will work with all "current" supported releases of PHP. I had no idea this was mentioned before.

Keep up the great guys...
 
meotoo
Hangin' Around



Joined: Aug 04, 2009
Posts: 36

PostPosted: Tue Sep 29, 2009 12:16 pm Reply with quote

some time ago i've posted a ereg() replacement function which just a wrapper to preg_match(), isn't that enough? however there may was something wrong im not aware of with my function since i didn't get reply regarding that function post... Rolling Eyes

whatever, IMHO it does not matter if nuke uses 2, 639, or 20000 instances of ereg(), since you can get rid of all those deprecated warnings in two seconds by using the sed tool to replace them..(just can't resist to say it, im quite sure everything i can say on the matter all you guys are well aware of it already) Wink

gretz.
 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Tue Sep 29, 2009 1:38 pm Reply with quote

The main issue is that once something is labeled "deprecated" it can be removed at any time Smile
 
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Tue Sep 29, 2009 1:40 pm Reply with quote

meotoo, I assume you mean this post: [ Only registered users can see links on this board! Get registered or login! ]
 
View user's profile Send private message
meotoo







PostPosted: Tue Sep 29, 2009 2:01 pm Reply with quote

Yes Jakec, that post.

@Raven:

Yes, most of the times.. but note it was already labeled "deprecated" long ago Wink i'll probably fix my nuke install once i notice my site does not work anymore because my hosting provider updated to php6 without letting know its customers.. =)
 
Palbin







PostPosted: Tue Sep 29, 2009 4:03 pm Reply with quote

I wouldn't worry about that since PHP 6 isn't even released yet. Wink
 
montego







PostPosted: Wed Sep 30, 2009 7:57 pm Reply with quote

meotoo wrote:
some time ago i've posted a ereg() replacement function which just a wrapper to preg_match(), isn't that enough? however there may was something wrong im not aware of with my function since i didn't get reply regarding that function post... Rolling Eyes


I don't understand what you mean as Palbin had an on-going discussion with you on that thread. My turn to Rolling Eyes

Quote:
whatever, IMHO it does not matter if nuke uses 2, 639, or 20000 instances of ereg(), since you can get rid of all those deprecated warnings in two seconds by using the sed tool to replace them..


Maybe for many, but not for all as I believe some arguments may not be exactly equivalent... I said "may not be". We have to consider ereg(), eregi(), ereg_replace(), etc. I'd rather make sure each and every one of the changes are reviewed...
 
meotoo







PostPosted: Wed Sep 30, 2009 8:13 pm Reply with quote

montego wrote:
I don't understand what you mean as Palbin had an on-going discussion with you on that thread. My turn to Rolling Eyes


read carefully again what i wrote..("reply regarding that function") Smile of course i had a little discussion with Palbin regarding other things.

montego wrote:
Maybe for many, but not for all as I believe some arguments may not be exactly equivalent... I said "may not be". We have to consider ereg(), eregi(), ereg_replace(), etc. I'd rather make sure each and every one of the changes are reviewed...


Well, the helpfulness of a wrapper function is that shouldn't be reviewed every place where the "child" function is used, while the wrapper itself is written on a bugfree fashion, which shouldn't be dificult for a too simple function as ereg* is. Wink
 
montego







PostPosted: Wed Sep 30, 2009 8:19 pm Reply with quote

I am not criticizing your coding one bit as I am sure it works just fine. I just prefer to fix the issue rather than putting my thumb into the dike... and since we have plenty of time before 6.0 is a general release reality, we'll have this fixed in time.
 
meotoo







PostPosted: Wed Sep 30, 2009 8:38 pm Reply with quote

montego wrote:
I am not criticizing your coding


You can, if you want. no problem Smile

montego wrote:
as I am sure it works just fine.


don't put your hand on fire about that.. i wrote that function in two minutes and i didn't even tested it myself, (by that reason i thought it may was just buggy by not getting reply about it)..

I am not suggesting either you guys should use my wrapper and forget the rest, at all. i put that function here and if someone whats to use it he is free to do so, else no problem - of course.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©