Instructions - Question - Answer
Too few arguments to function Instructions::getTopics(), 0 passed in /home/solomono/web/solomono.net/templates/content/article_new_instructions.tpl.php on line 20 and exactly 1 expected (500 Whoops, looks like something went wrong.)

Too few arguments to function Instructions::getTopics(), 0 passed in /home/solomono/web/solomono.net/templates/content/article_new_instructions.tpl.php on line 20 and exactly 1 expected

Exception

ArgumentCountError

  1.             );
  2.         }
  3.         return $articles_array;
  4.     }
  5.     public function getTopics($parent_id)
  6.     {
  7.         $parent_id $parent_id ?: self::INSTRUCTION_TOPIC_ID;
  8.         $output = [];
  9.         $topics_query tep_db_query("SELECT t.topics_id,t.parent_id, td.topics_name, a2t.articles_id FROM topics t
  10.                                       LEFT JOIN articles_to_topics a2t ON t.topics_id = a2t.topics_id
  1. if(isset($_GET['ikeywords']) && $_GET['ikeywords'] == "") unset($_GET['ikeywords']);
  2. $instruction = new Instructions((int)$_SESSION['languages_id']);
  3. $topics_array $instruction->getTopics();
  4. $search_action tep_href_link(FILENAME_ARTICLES'tPath=' $instruction::INSTRUCTION_TOPIC_ID);
  5. if ($tPath == Instructions::INSTRUCTION_TOPIC_ID) {
  6.     $topics_ids = array();
require('/home/solomono/web/solomono.net/templates/content/article_new_instructions.tpl.php') in /home/solomono/web/solomono.net/includes/modules/article_instructions.php (line 14)
  1.   Released under the GNU General Public License
  2. */
  3. $instructions_array = [23]; get_topic_list(23$instructions_array);
  4. if (in_array($tPath$instructions_array)) {
  5.     require(DIR_WS_TEMPLATES '/content/' TEMPLATENAME_ARTICLE_NEW_INSTRUCTIONS);
  6. } else {
  7. // article_instructions gets id of article catecory and id of article and shows them in left and right
  8. //$listing_split = new splitPageResults($listing_sql, 500);
include('/home/solomono/web/solomono.net/includes/modules/article_instructions.php') in /home/solomono/web/solomono.net/templates/content/articles.tpl.php (line 188)
  1.          
  2.       $instructions_array = [23]; get_topic_list(23$instructions_array);
  3.       if(in_array($current_topic_id ,$instructions_array)) {
  4.   // if instructions
  5.   include(DIR_WS_MODULES FILENAME_ARTICLE_INSTRUCTIONS);
  6. } else {
  7.   // else articles
  8. //  include(DIR_WS_MODULES . FILENAME_ARTICLE_LISTING);
  9.           require (DIR_WS_TEMPLATES '/content/' TEMPLATENAME_BLOG);
require('/home/solomono/web/solomono.net/templates/content/articles.tpl.php') in /home/solomono/web/solomono.net/templates/solo/main_page.tpl.php (line 407)
  1.     <?php endif ?>
  2.     <?php if (isset($_GET['products_id']) && !productIsTemplate($_GET['products_id']))
  3.         require(DIR_WS_CONTENT 'product_info_new.php');
  4.     else
  5.         require(DIR_WS_CONTENT $content '.tpl.php');
  6.     ?>
  7.     <div class="hFooter"></div>
  8. </main>
  9. <footer>
require('/home/solomono/web/solomono.net/templates/solo/main_page.tpl.php') in /home/solomono/web/solomono.net/article_info.php (line 88)
  1.   require(DIR_WS_TEMPLATES TEMPLATE_NAME '/' TEMPLATENAME_MAIN_PAGE);
  2.   require(DIR_WS_INCLUDES 'application_bottom.php');
  3. }
  4. ?>

Stack Trace

ArgumentCountError
ArgumentCountError:
Too few arguments to function Instructions::getTopics(), 0 passed in /home/solomono/web/solomono.net/templates/content/article_new_instructions.tpl.php on line 20 and exactly 1 expected

  at /home/solomono/web/solomono.net/includes/classes/instructions.php:37
  at Instructions->getTopics()
     (/home/solomono/web/solomono.net/templates/content/article_new_instructions.tpl.php:20)
  at require('/home/solomono/web/solomono.net/templates/content/article_new_instructions.tpl.php')
     (/home/solomono/web/solomono.net/includes/modules/article_instructions.php:14)
  at include('/home/solomono/web/solomono.net/includes/modules/article_instructions.php')
     (/home/solomono/web/solomono.net/templates/content/articles.tpl.php:188)
  at require('/home/solomono/web/solomono.net/templates/content/articles.tpl.php')
     (/home/solomono/web/solomono.net/templates/solo/main_page.tpl.php:407)
  at require('/home/solomono/web/solomono.net/templates/solo/main_page.tpl.php')
     (/home/solomono/web/solomono.net/article_info.php:88)