oracle+phpでget_latest_touchでユーザー検索時にORA-00904が発生する

Description

https://github.com/movabletype/movabletype/blob/mt8.0.4/php/lib/mtdb.base.php#L3990

SQLのwhere句で touch_object_type ="author"が指定されており、Oracleでは文字列の引用符としてダブルクォーテーションが許可されていないため。

手順

  1. Oracle環境を用意する。

  2. テンプレートモジュールを作成

  3. 「モジュールのキャッシュ」の設定を「作成または更新後に無効にする」とし、ユーザーを選択する。

  4. PHPErrorLogFilePathを指定する。

  5. テンプレートを作成し、MTIncludeタグで2のモジュールをインクルードする。

  6. (期待する動作)ログに下記のようなSQLエラーが記録されない。

    ADODB_Exception: oci8 error: [904: ORA-00904: "author": invalid identifier] in EXECUTE("select * from (select * from mt_touch WHERE 1 = 1 and touch_blog_id = 0 and touch_object_type ="author" order by touch_modified_on desc) where rownum <= :adodb_offset")

Environment

None

Checklists

None

Activity

Show:

Keita SugamaJuly 16, 2024 at 1:15 AM

関連課題と合わせてマージ済みです。

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Smart Checklist

Created June 17, 2024 at 8:20 AM
Updated July 16, 2024 at 1:15 AM
Resolved July 16, 2024 at 1:15 AM