• hi,

    Fatal error: Uncaught Error: count(): Argument #1 ($value) must be of type Countable|array, string given in line 150 of wp-content/plugins/anspress-question-answer/addons/tags/tags.php!

    the line 150 is:

    $ap_max_num_pages = ceil( count( $tags_rows_found ) / $per_page );

    So I changed it to:

    <span class="hljs-variable" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">$ap_max_num_pages</span> = <span class="hljs-title function_ invoke__" style="color: var(--cib-color-syntax-purple); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">is_countable</span>(<span class="hljs-variable" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">$tags_rows_found</span>) ? <span class="hljs-title function_ invoke__" style="color: var(--cib-color-syntax-purple); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">ceil</span>(<span class="hljs-title function_ invoke__" style="color: var(--cib-color-syntax-purple); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">count</span>(<span class="hljs-variable" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">$tags_rows_found</span>) / <span class="hljs-variable" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">$per_page</span>) : <span class="hljs-number" style="color: var(--cib-color-syntax-blue); font-variation-settings: var(--cib-type-subtitle1-font-variation-settings);">0</span>; 

    Update it better please!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘count function error’ is closed to new replies.