Author Topic: SuperiorComplexFlow  (Read 3229 times)

Chunkford

  • Inner Core
  • Hero Member
  • *
  • Posts: 1057
    • View Profile
SuperiorComplexFlow
« on: April 18, 2014, 08:31:26 PM »
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.
"If my answers frighten you then you should cease asking scary questions"

Drastic

  • Need a bigger hammer...
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3087
  • Resident Redneck
    • View Profile
Re: SuperiorComplexFlow
« Reply #1 on: April 18, 2014, 09:03:55 PM »
Thick skin required in places like that, you have to expect it going in.

littleman

  • Administrator
  • Hero Member
  • *****
  • Posts: 6552
    • View Profile
Re: SuperiorComplexFlow
« Reply #2 on: April 18, 2014, 09:12:20 PM »
Just curious, what was your question?

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9294
    • View Profile
Re: SuperiorComplexFlow
« Reply #3 on: April 18, 2014, 09:14:45 PM »
>>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).

BoL

  • Inner Core
  • Hero Member
  • *
  • Posts: 1209
    • View Profile
Re: SuperiorComplexFlow
« Reply #4 on: April 18, 2014, 09:37:51 PM »
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.

Chunkford

  • Inner Core
  • Hero Member
  • *
  • Posts: 1057
    • View Profile
Re: SuperiorComplexFlow
« Reply #5 on: April 18, 2014, 09:50:57 PM »
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.
"If my answers frighten you then you should cease asking scary questions"

littleman

  • Administrator
  • Hero Member
  • *****
  • Posts: 6552
    • View Profile
Re: SuperiorComplexFlow
« Reply #6 on: April 18, 2014, 10:02:24 PM »
You could try asking at: http://www.reddit.com/r/php

Chunkford

  • Inner Core
  • Hero Member
  • *
  • Posts: 1057
    • View Profile
Re: SuperiorComplexFlow
« Reply #7 on: April 18, 2014, 10:08:14 PM »
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
"If my answers frighten you then you should cease asking scary questions"

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9294
    • View Profile
Re: SuperiorComplexFlow
« Reply #8 on: April 18, 2014, 11:24:50 PM »
Quote
I 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

Quote
if (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'.

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9294
    • View Profile
Re: SuperiorComplexFlow
« Reply #9 on: April 18, 2014, 11:30:06 PM »
copied this to Stack Exchange. If you vote me down you're on my sh## list ;-)

Chunkford

  • Inner Core
  • Hero Member
  • *
  • Posts: 1057
    • View Profile
Re: SuperiorComplexFlow
« Reply #10 on: April 19, 2014, 09:31:59 AM »
and this is why I don't program. My inferior brain can't handle it.

Thanks Ergophobe
"If my answers frighten you then you should cease asking scary questions"

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 9294
    • View Profile
Re: SuperiorComplexFlow
« Reply #11 on: April 19, 2014, 04:23:40 PM »
Glad to be of assistance sir.

This reason for the question being put on hold is absurd:

Quote
Please 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.