カテゴリー
WordPress

Warning: array_merge() [function.array-merge]: Argument #2 is not an array

WordPressでCutline 3-Column Right 1.1というテーマを使ってみようとダウンロードしてきて試したところ、下記のようなエラーが出ました。

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in …../wp-includes/widgets.php on line 60

エラー内容からちょっと検索してみると、

http://wordpress.org/support/topic/165568

The solution is located here:

http://wordpress.org/support/topic/148108

I put the one line of code in the widgets.php file on the line number that was the problem (for me it was line 60 – the old code was
$sidebar = array_merge($defaults, $args);

The proper code should be:
$sidebar = array_merge($defaults, (array)$args);

というWordpressに変更を入れる解決方法が出てきているのですが、

No, that’s not your problem. The real problem is in your theme, it’s making a call to the register_sidebar function with incorrect parameters. I suspect that it’s something like register_sidebar(2); in your theme’s functions.php file, when it should really be doing register_sidebars(2);. Note the extra “s”.

実はこれはテーマの方の問題で、テーマに含まれれるfunctions.phpの中で関数名に”s”を付け忘れているというのが真相だそうです。

/wp-content /themes/cutline-3-column-right-11/functions.phpの5行目にあるregister_sidebarに"s"を追加すればOKになりました。

/* blast you red baron! */
require_once (ABSPATH . WPINC . '/class-snoopy.php');

if ( function_exists('register_sidebars') )
register_sidebars(2);

$current = 'r167';
function k2info($show='') {

カテゴリー
WordPress

WordPress.com StatsでFatalエラーが出る

WordPress.com Stats というプラグインを先日来使っているのですが、今日

Fatal error: Only variables can be passed by reference in
     ほげほげ/wp-content/plugins/stats/stats.php stats.php on line 548

というエラーがダッシュボードのstats枠に出ているのに気が付きました。Versionは1.2.1です。当初、こんなエラーは出てなかったはずなのでおかしいなと思って調べてみると、同じトラブルに遭遇している人がやはりいました。

wp-stats plugin v. 1.2 Fatal error stats.php on line 548 (8 posts)

I’m getting an error on my dashboard using wp-stats plugin version 1.2 on new wp 2.5. The double wide widget shows the graph on the left just fine but does not show the top posts on the right – only the followin error:
Fatal error: Only variables can be passed by reference … in <path>stats.php on line 548
:
:
The fix is this:
Edit the file stats.php, and change line 543:

if ( !$stats_cache = get_option( 'stats_cache' ) )
      $stats_cache = array();

to:

$stats_cache = get_option( 'stats_cache' );
    if ( !$stats_cache || !is_array( $stats_cache ) )
      $stats_cache = array();

この通りに変更したら解決しました。

カテゴリー
WordPress

WordPress 2.5.1 日本語版

今日、WordPress 2.5.1日本語版がリリースされました。
2.5からのアップグレードはzipファイルを取ってきてそのまま上書きで解凍して /wp-admin/upgrade.php にアクセスして完了。
一応、元のファイル群はコピーして残しておきますがそのまま上書きで特に問題なし。
カテゴリー
WordPress

FEEDJIT

FEEDJIT」というブログツールを入れてみました。サイドバーに”Live traffic feed”とあるのがそれです。リアルタイムでブログにアクセスしてきた人のおおよその場所とどこから来たかが分かるようになっています。一番上に出てきているのが今これを読んでいるあなたのアクセス元の情報です。「Southport, Queensland」とあるのは多くの場合、私自身のアクセスですね。意外と詳しい位置を出してきますね。でも日本の場合は地方でも東京とみなされるケースも多々あるでしょう。実際、関西からのアクセスが東京になってたりしてます。
カテゴリー
WordPress

Flexible UploadがWordPress 2.5に対応!

Version 1.9でWordPress2.5に未対応だったFlexible UploadがVersion1.10で2.5対応になりました。

FYI

さくら キャプション
桜が咲いた(Flexible Uploadテスト)