htmlspecialchars_decode bug in Wordpress 2.7.1

It has been brought to my attention that there is currently a small bug in Wordpress 2.7.1 that affects certain users of my Status Press Widget and Customizable Search Widget.

This bug mainly affects users of PHP4, because the htmlspecialchars_decode function is not included until PHP5, so Wordpress has now integrated a simulation of the same function in the code core of 2.7.

If you are a PHP4 user running Wordpress 2.7.1, you may get this error from a plugin or widget that attempts to access the htmlspecialchars_decode function:

Warning: htmlspecialchars_decode() expects parameter 1 to be string, NULL given in /home/myname/public_html/personal/wp-includes/compat.php on line 105:

PHP5 users already have this function inherint in their repository, so it just bypasses the Wordpress simulation function.

Apparently when 2.7.1 was released, a slight oversight caused the function to be looking for a variable that was not being passed to it because of a misnaming error.

Details about this error are located in the Wordpress bug tracking system, and it looks like a fix has been submitted for the next version.

However, what should I do until the update? I did some looking into the code that is affected, and noticed that basically in the htmlspecialchars_decode function, Wordpress passes the two expected variables (the string, and the quote style) to its own parser called wp_specialchars_decode. Instead of relying on the PHP version, I have updated my plugins to directly call the Wordpress version of the function to ensure compatibility. Scratch that, that’s not going to work. The wp_specialchars_decode function is only included in Wordpress as of 2.7.1, so it is not backwards compatible and not wise to use.

Instead, you should go ahead and fix the problem with the core file if you are using 2.7.1 and PHP4.

  1. Open up /public_html/<WP Directory>/wp-includes/compat.php
  2. Scroll down to line 104:   if ( !is_scalar( $string ) ) {
  3. Change $string to $str
  4. Do the same thing for the line below it, 105.
  5. Save the file back to your server
  6. Update your plugins.

When you have followed these steps, you should be good to go.  If you do not feel comfortable editing the file yourself, you can just download my edited copy of compat.php:

  compat.php (3.4 KiB, 176 hits)
You need to be a registered user to download this file.

Be sure to upload it to the wp-includes directory. Then update the plugins and widgets that have become broken.

You can find the updates to my widgets here:

If you have any questions or concerns, please do not hesitate to let me know. Oh, and if this has helped you, don’t forget to show a little love:

The Machine Conks…

While reading Mere Christianity, I came across this quote which reminded me of our current state in the nation.

God cannot give us a happiness and peace apart from Himself, because it is not there. There is no such thing.

That is the key to history. Terrific energy is expended–civilisations are built up–excellent institutions devised; but each time something goes wrong. Some fatal flaw always brings the selfish and cruel people to the top and it all slides back into misery and ruin. In fact, the machine conks. It seems to start up all right and runs a few yards, and then it breaks down. They are trying to run it on the wrong juice.

-Mere Christianity, by C.S. Lewis.

The $700 Billion Bailout

We’ve all heard about the recent push by the government to pass quickly a bill that would bailout the large corporations that are coming up short with crap mortgages and junk bonds and such. Apparently this bailout solution is supposed to keep the economy from an apocalyptic meltdown, and is supposed to completely fix the economy as it is. However, this action is not what the government and media have made it out to be. This is a quick fix that will not last.

So now I am extremely concerned about the government’s band-aid action to the recent financial crisis. $700 billion dollars is not just money to throw around; it is our hard earned money as tax payers that will be going to these dishonest companies and individuals. Giving them this money and bailing them out like this will just result in the pat on the back that tells them its OK, we’ll always be there to bail you out whenever you need it. No! They are the ones who have gambled by throwing the dice, and they have lost. Just like in Vegas, they need to accept their losses and move on, do their best to scrape together and start again.

The thing that really ticks me off is that this “bailout” is being postulated as the one and only option available by both the government and the media. How can they get away with pushing this through so quick without a real analysis of alternative options? Do you realize what will happen when the government gives away $700 Billion? The only way the government can get this money in the first place is to print it, which will thereby decrease the low value of the dollar even lower!

So has anyone taken any time to consider some of these alternative options? Former Presidential Candidate Governor Mike Huckabee wrote a blog about his frank disappointment with the way his party (the Republicans, President Bush) has handled this crisis. But he does not just criticize, he offers some alternative suggestions:
If Congress wants to do something, here are some suggestions:

1. Eliminate ALL capital gains taxes and taxes on savings and dividends right now. Free up the capital and encourage investment. This is the kind of economic stimulus the Fair Tax would bring and if Congress is going to lose money, let them lose it with lower taxes, not with public dollar bailouts of private market mistakes.

2. Repeal Sarbanes/Oxley. It has failed. It was supposed to prevent this. It didn’t. Kill it.

3. Demand that the executives who steered their ships into the ground be forced to pay back the losses of their companies. Of course, they can’t, so let them work and give back to the government and they can live like the people they put on the streets or kept there. It makes no sense to put them in jail-that’s just more they will cost you and me. I’d rather them go out and earn money-just not get to keep so much of it this time. I’m not talking about limiting CEO salaries—just those of the people who now are up in Washington begging for help because they ruined their companies.
[link]

Another option I have heard is about something on the table in Washington to “change the mark-to-market accounting law and to extend insurance but extend no loans.” Supposedly, doing this will help open up the market for a far less price.

“If the government insured those mortgages, they would then be marketable. And could sell them. And the companies would stay afloat. And we, the people, don’t have to get into the mortgage business.”
[link]

So why have we not heard about any of these as viable alternative options? Because everyone in the government is all up in arms to fix this thing quick the only way they know how…step in and throw tax payer money at the beggars.

We the people of this nation should not be punished for the greed and misconduct of the companies and executives as a result of their asinine gambling and risky stakes that they have taken because of their corruption and greed!

We need to take a stand and voice our concerns over giving our money away without our consent to executives and companies that will just waste this money again… This will just be a vicious cycle resulting in the continual downward spiral of the American economy resulting in collapse.

Voices

I recently found the new House of Heroes cd, The End is Not the End streaming online at Absolute Punk.net (you can also find it at Relevant’s The Drop). A complete review will be coming soon.

However, I did want to touch on one aspect that hit me good. Their second to last (technically third to last, as there is a “secret song” at the end of the last track) song, Voices, vividly describes the haunting of innocent voices that have been disgraced by the singer. Essentially the core of the song is summed up in this quote:

In a graceless world / I was graceless / …how can God show mercy? / I was merciless to them?

This is recounted through cries of regrets of deeds done and not done in life.  Injustice was introduced to the world around. The main crux, the sin that the singer so regrets, is the constant murder required of him while fighting in a brutal war.

Then, after all this lament, a speaker comes in with these profound words:

Your greatest sin is not the abortion you’ve asked forgiveness for
or the adultery or whatever it is you did in your life in your past that you’re ashamed of
that keeps hounding you.

Your greatest sin is not that.
Your greatest sin is not believing God’s Word when God says you’re forgiven!
Your greatest sin is unbelief!

You want to repent of something, friend?
Stop repenting of sins you’ve already repented of
and repent of your unbelief.

Wow. How often do I beat myself up over something that I know I am ashamed of, that I have asked forgiveness for? This is a continuing attack even after I have been forgiven. God has forgiven me, and that is that. Don’t continue to crucify Christ over again by beating myself up over and over again in an attempts to suffer through my own purgatory.

P.S. If you are interested in where that sermon is from, I scoured the internat and finally stumbled upon it among some sermon notes. It is a sermon by Rich Nathan at Vineyard Church of Columbus (Ohio), called The Triumph of the Cross. Clicking that link will take you to the mp3 of that sermon, and that section above is located about 3/4 the way in.

Thoughts on Gov. Palin as McCain’s Running Mate

I did not hear about McCain’s pick for VP until Friday afternoon when I was having lunch with a friend, and she told me who he picked. I had seen earlier that morning that some governor, Sarah Palin, was a good possibility…but nothing had been confirmed then. As my friend told me about Gov. Palin, I was intrigued and read up on her when I got back later that afternoon.

Late in that afternoon, I noticed that my good friend from college, Aaron Blake Huddleston, wrote up a great article detailing strengths and weaknesses regarding McCain’s pick of Gov. Sarah Palin for VP on a note on Facebook. He did a great job on the research and explaining a few not easily understood topics. With his permission, I am posting it here on my blog for anyone who is interested, or not interested since it should not be confined to those on Facebook. Give it a read, even if you don’t really care.

I think that Gov. Sarah Palin was an excellent choice for Senator McCain. (True, I would have preferred he choose Huckabee, but that’s beside the point.)

Strengths

Gov. Palin is a woman which will help Senator McCain go after some of the swing votes who liked Senator Clinton but don’t like Senator Obama. This is not to suggest that Hillary supporters would vote for anything in a skirt, but simply that (in some cases) the fact that she is a woman will help get their attention so they’ll hear what McCain/Palin have to say.

Gov. Palin is a TRUE conservative. Sen. McCain needs to earn the trust of right wingers. He’s a self-described Maverick. He’s considered moderate, and slightly left of where most conservative voters are comfortable placing their votes. Having a TRUE conservative on the ticket with him will help bring him back into favor with those who were concerned about this (and about his ability to appoint the right kind of justices).

Gov. Palin is STRONGLY pro-life. She is a part of the group Feminists for Life. This will help Sen. McCain secure the pro-life vote (a large group who were on the fence about him because of some of the people on his VP short-list).

Gov. Palin is a bit of a maverick herself. While staying true to conservative values and platform, Gov. Palin has spent her time in office digging out corruption, throwing out old policy (set in place by republicans) that just wasn’t working, and “cleaning house” of appointed officials who were either corrupt or just not doing their jobs well. This will take the wind out of the sails of Sen. Obama’s “Agent of Change” campaign. Sen. Obama has no record to support his claims to be an agent of change, and his VP pick CERTAINLY is not an agent of change. Meanwhile, Sen. McCain has proven he can go against President Bush’s policies and incite change where it is needed (the Surge, for example), and Gov. Palin’s entire time in office has been about changing what was wrong with the previous administration.

More on Gov. Palin’s maverickhood….This will also help Sen. McCain fight the attacks from Sen. Obama that he will be “a third term for Bush.” By pointing out Gov. Palin’s history of digging out what was wrong with the previous republican administration and fixing it, Sen. McCain can argue that he intends to do the same with the White House.

Gov. Palin can win votes and trust. Gov. Palin’s approval rating has never been under 80%, and, in fact, has been over 90% for much of her time in office. This shows that she is able to win people over, that she is good at what she does, and that she will be able to help secure votes.

She’s a surprise! Weird that it’s a strength, but it is. Nobody had even considered her an option until they found out that it WAS her. People were surprised, almost shocked, when they heard. This is good for the campaign because it keeps it in the news. She’s such a surprise and such a shock, that the media will want to pay a lot of attention to her in the coming weeks and months (especially because they missed her in the coverage leading up to her selection when they were focussed on Gov. Romney and Gov. Ridge). This continued media coverage will help the McCain campaign get face time in what has (thus far) been dominated by Sen. Obama.

Weaknesses

Inexperience. Sen. Obama’s campaign has tried to argue that Gov. Palin doesn’t have enough experience to be “a heartbeat away from the presidency.” However, Gov. Palin’s experience makes Sen. Obama look like a school boy in some ways. While she is only a 1-term governor of a smaller state, her time there has done well to prepare her for this office. She is one of few governors who can boast foreign policy experience. Because of Alaska’s location, she has had to work out foreign policy with both Canada and Russia. Being governor has given her administrative and executive experience. She has accomplished more for the state in her 1 term as governor than Sen. Obama has done in his time as a Senator from Illinois. (Where he passed no legislation, and missed most of his votes).

Speaking ability. This is a big one (and one of the reasons I would have preferred Huckabee). While the text of her speech today was good, her delivery left something to be desired. She didn’t know how to handle a crowd that big and often found herself stuttering and seeming very awkward whenever the crowd would erupt into cheers. With a weak public speaking ability like that, I fear she will not be able to hold her own against the very experienced Sen. Biden.

The controversy. Okay, it had to be mentioned (even though it’s pathetic)…There IS a slight controversy surrounding her in Alaska right now. It seems she fired the Public Safety Commissioner in Alaska. She says that she did this because there were State Trooper vacancies that were not being filled (in other words, he wasn’t doing his job). The former commissioner claimed that it was because he didn’t fire her sister’s ex-husband (a state trooper) who was engaged in a bitter custody battle with Gov. Palin’s sister. Apparently a member of Gov. Palin’s administration had contacted him to discuss the issue of firing this state trooper without Gov. Palin’s knowledge. When she found out, she placed this member of her administration on a 2 month suspension for acting outside of the scope of his authority. An investigation was later launched, which Gov. Palin welcomed, opening up her files and saying she had nothing to hide. Those conducting the investigation have not had to subpoena anything because she has given full cooperation, and they’ve come up with nothing on her. Also, before we get carried away with the man asking that this state trooper be fired, let’s look at why he was making the request. It was not because he had divorced Gov. Palin’s sister. It was because he had threatened to kill his father-in-law (yes, the Governor’s father, but that doesn’t matter…he threatened to kill an innocent civilian…), he had tasered his 11-year-old step-son (at the boy’s request, but it’s still not allowed), and he had broken gaming laws. To me, that’s 3 strikes you’re out. Those were the reasons that a member of the administration asked about firing the state trooper, it had nothing to do with the Governor’s sister, and it was done without Gov. Palen’s knowledge. All that said, as much BS as the controversy is, it is possible that Sen. Obama and his campaign will attempt to exploit it to deceive voters into thinking Gov. Palin is corrupt (although certainly voters are smart enough to see Sen. Biden’s corruption…).

She’s a surprise. Yes, I listed this as a strength as well. For all of those reasons it’s a good thing. But for this reason it’s a bad thing: Nobody knows much about her. All that I know I found out through researching her extensively today, but the average voter doesn’t know much about her. That’s bad on 2 levels. First of all, it’s bad because she doesn’t have a name recognition that will automatically bring some voters over…she’ll have to work hard for all the votes she gets. The second reason it’s bad is because, sadly, most voters aren’t as responsible as me. Rather than dig and search and do their own research on Gov. Palin, they will wait and listen to what sources like CNN and MSNBC have to say about her. Which means they will get all of their information about her from sources with a definite bias. This could definitely hurt the McCain/Palin campaign.

In all, I think she was a very wise choice, but they will have a few bullets to dodge. Hopefully Sen. McCain’s campaign advisors are up to the challenge. I just thank the Lord that Sen. McCain picked a true conservative running mate instead of somebody like Gov. Ridge…I wasn’t sure what I would do if he’d picked Gov. Ridge or Sen. Lieberman.

posted from http://www.new.facebook.com/note.php?note_id=38317098696&ref=mf

I knew most of the points that he made already, but Aaron did a great job summarizing them and showing how each point could go one way or the other.

Thanks Aaron for clearing up the “controversial” issue with Sarah Palin…The news tried to explain it, but to tell you the truth, I didn’t get “the controversy” totally until reading his post.

Yep, I agree, she’s not Huckabee, but she’s still a great choice.

P.S. I did think it was amuzing that a search for Sarah Palin on Facebook already results in precisely 480 groups (at this moment) dedicated to loving her, hating her, or hitting on her. Check it out.

SEO Powered by Platinum SEO from Techblissonline