If you want to feel like you've just been chewed on and spat back out then ask a question at StackOverFlow.
Enough said, I'm going over to my corner to sulk now.
Thick skin required in places like that, you have to expect it going in.
Just curious, what was your question?
>>Just curious, what was your question?
Me too.
My questions have typically gotten no response at all. Echo chamber.
I've answered a couple of questions there and gotten an upvote or two, but nothing really strong either way.
That said, there are so many questions already answered there, that one wonders what will happen to some of the forums. Although, people persist on asking the same mod_rewrite questions daily on the WebmasterWorld Apache Forum (or did as long as Jim and g1smd were active).
Really useful place but a bit regimental at times.
I replied to a 2 month old orphan 'just in case they hadn't found a solution'. I posted it as a full reply rather than a comment, and got a response that it "didn't deserve a full reply and was only worth a comment". I lacked the rep to post comments and said so... and they went on about how the reputation system is there for a reason. My last response was asking whether a) I should have posted at all b) Posted fluff on other threads to build a rep c) throw my toys out the pram and delete the post or d) they're being anal retentive. No response to that. Smert erses.
Yea, I should have expected it.
http://stackoverflow.com/questions/23161206/why-doesnt-work
TBH it was more down voting that annoyed me the most. Seems to have gone up a bit since I changed it.
Its probably a silly question anyway but I honestly have no idea what's happening and Im getting fed up having to manually change it at midnight.
You could try asking at: http://www.reddit.com/r/php
Cheers LM, will give it a go tomorrow.
I like to think I know enough but I really have no idea what the hell is going on. It makes no sense to me so I can only think what it looks like to someone in the know
QuoteI discover that this code doesn't die after if ( !isset( $_POST['product-type'] ) || 'subscription' != $_POST['product-type'] ) return $post_id;
So I remove || 'subscription' != $_POST['product-type'] it works and dies.
When I var_dump($_POST); the product_type clearly says ["product-type"]=> string(12) "subscription"
So why wouldn't || be working is this situation
Based on the information you give, it SHOULD fail. Let's do a little substitution.
Quote!isset( $_POST['product-type'] ) evaluates to !TRUE evaluates to FALSE
Quote'subscription' != $_POST['product-type'] evaluates to 'subscription' != 'subscription' evaluates to FALSE
So as a whole, your test evaluates to
Quoteif (FALSE || FALSE)
So both conditions are false and the whole thing is false and program execution moves on.
If you want to get to the die statement, you need to either send it a $_POST variable where the 'product-type' element is empty or it equals something other than 'subscription'.
copied this to Stack Exchange. If you vote me down you're on my shit list ;-)
and this is why I don't program. My inferior brain can't handle it.
Thanks Ergophobe
Glad to be of assistance sir.
This reason for the question being put on hold is absurd:
QuotePlease clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
As I demonstrated above, it is obvious exactly what you're asking. The question was well-formulated and the solution simple. The fact that they down voted it and then punted on an elementary question (if you'll excuse me for saying so) does not reflect well on SOF.
I haven't been active in the WebmasterWorld PHP forum very much since I stepped down as moderator, but at least in those days you would have gotten a straight up, simple and respectful answer there instead bullshit condescension and no answer at all.