PHP warning

Trying to access array offset on value of type null

/home3/searchdo/public_html/protected/views/blog/display.php(16)

04 $blogs = array();
05 while ($row = mysqli_fetch_array($blogss)) {
06     $blogs = $row;
07 } if (!empty($blogs)) {
08     $t = 1;
09     $reg = "SELECT * FROM `reg_ngo` WHERE `uid` =" . $blogs['uid'] . " and `status`=1";
10     $users = mysqli_query($GLOBALS["mysqli_con"], $reg);
11     $user = array();
12     while ($row = mysqli_fetch_array($users)) {
13         $user = $row;
14     } $this->pageTitle = $blogs['title'];
15     Yii::app()->clientScript->registerMetaTag($blogs['title'] . " | Blogs", 'keywords');
16     Yii::app()->clientScript->registerMetaTag($blogs['title'] . ' Blogs, ' . substr($row["contents"], 0, 120), 'description'); ?> 
17      <div class="row">
18    <div class="col-12 mt-10">
19         <?php if ($t == 1) { ?> <h1><?php echo $blogs['title']; ?></h1> 
20     <b>Posted by: </b><?php echo $blogs['dou']; ?> ,<b> By</b> <a href="https://www.searchdonation.com/ngo/<?php echo $user['userfolder']; ?>.php?lst=blogs" ><?php echo $user['name']; ?></a> 
21    <?php if (!empty($_SESSION['userID']))
22             if ($blogs['uid'] == $_SESSION['userID'] or $_SESSION['accesstype'] == 1 or $_SESSION['accesstype'] == 9) { ?> <a href="https://www.searchdonation.com/postblogs/update/?id=<?php echo $blogs['blog_id']; ?>" ><img src="https://www.searchdonation.com/images/req-image/edit.png" /></a> <?php } ?>
23             </div>
24             <div class="col-12 mt-10">
25             <p align="justify">
26 <?php if (!empty($blogs['image']) and file_exists('/home/searchdo/public_html/images/blogs/' . $blogs['image'])) { ?> <img src="<?php echo 'https://www.searchdonation.com/images/blogs/' . $blogs['image']; ?>" class="imgblog"/> <?php } ?> <?php echo nl2br($blogs['contents']); ?></p> <b>Read more: </b><a href="<?php echo $blogs['ref_url']; ?>" target="_blank" >Click Here</a> <?php } else { ?> <h1>Requested page does not exist!</h1> <p>The requested page either has been removed or deactivated, if you are business owner contact to web administrator! </p>  <?php } ?> 
27 
28   </div>

Stack Trace

#4
+
 /home3/searchdo/public_html/protected/controllers/BlogController.php(1): CController->render("display")
1 <?php class BlogController extends Controller { public $layout='//layouts/column2'; public function actions() { return array( 'captcha' => array( 'class' => 'CCaptchaAction', 'backColor' => 0xFFFFFF, ), 'page' => array( 'class' => 'CViewAction', ), ); } public function actionIndex() { $this->render('index'); } public function actionCategory() { $this->render('category'); } public function actionDisplay() { $this->render('display'); } public function actionBlogs_page_generator() { $this->render('blogs_page_generator'); }public function actionAdvocacyandresearch() { $this->render('categorypage', array("name" => "Advocacy and Research", "pagename" => "advocacy-and-research", "countno" => "1")); }public function actionAgedandelderly() { $this->render('categorypage', array("name" => "Aged and elderly", "pagename" => "aged-and-elderly", "countno" => "1")); }public function actionHusbandrydairyingfisheries() { $this->render('categorypage', array("name" => "Animal Husbandry, Dairying and Fisheries", "pagename" => "husbandry-dairying-fisheries", "countno" => "0")); }public function actionAnimalwelfare() { $this->render('categorypage', array("name" => "Animal Welfare", "pagename" => "animal-welfare", "countno" => "0")); }public function actionArtandculture() { $this->render('categorypage', array("name" => "Art and Culture", "pagename" => "art-and-culture", "countno" => "0")); }public function actionBiotechnology() { $this->render('categorypage', array("name" => "Biotechnology", "pagename" => "biotechnology", "countno" => "1")); }public function actionChildren() { $this->render('categorypage', array("name" => "Children", "pagename" => "children", "countno" => "2")); }public function actionCivicissues() { $this->render('categorypage', array("name" => "Civic Issues", "pagename" => "civic-issues", "countno" => "0")); }public function actionDalitwelfare() { $this->render('categorypage', array("name" => "Dalit Welfare", "pagename" => "dalit-welfare", "countno" => "0")); }public function actionDisability() { $this->render('categorypage', array("name" => "Disability", "pagename" => "disability", "countno" => "0")); }public function actionDisastermanagement() { $this->render('categorypage', array("name" => "Disaster Management", "pagename" => "disaster-management", "countno" => "0")); }public function actionEcotourism() { $this->render('categorypage', array("name" => "Eco tourism", "pagename" => "eco-tourism", "countno" => "0")); }public function actionEducationliteracy() { $this->render('categorypage', array("name" => "Education & Literacy", "pagename" => "education-literacy", "countno" => "1")); }public function actionEnvironmentnaturalresourcemanagement() { $this->render('categorypage', array("name" => "Environment and natural resource management", "pagename" => "environment-natural-resource-management", "countno" => "1")); }public function actionFoodandagriculture() { $this->render('categorypage', array("name" => "Food and Agriculture", "pagename" => "food-and-agriculture", "countno" => "0")); }public function actionHealthnutrition() { $this->render('categorypage', array("name" => "Health & Nutrition", "pagename" => "health-nutrition", "countno" => "0")); }public function actionHivaids() { $this->render('categorypage', array("name" => "HIV/AIDS", "pagename" => "hiv-aids", "countno" => "0")); }public function actionHousingandshelter() { $this->render('categorypage', array("name" => "Housing and shelter", "pagename" => "housing-and-shelter", "countno" => "0")); }public function actionHumanrights() { $this->render('categorypage', array("name" => "Human Rights", "pagename" => "human-rights", "countno" => "0")); }public function actionInformationandcommunicationtechnology() { $this->render('categorypage', array("name" => "Information & Communication Technology (ICT) ", "pagename" => "information-and-communication-technology", "countno" => "1")); }public function actionLabourandemployment() { $this->render('categorypage', array("name" => "Labour & Employment", "pagename" => "labour-and-employment", "countno" => "0")); }public function actionLandresources() { $this->render('categorypage', array("name" => "Land Resources", "pagename" => "land-resources", "countno" => "0")); }public function actionLegalawarenessandaid() { $this->render('categorypage', array("name" => "Legal Awareness & Aid", "pagename" => "legal-awareness-and-aid", "countno" => "1")); }public function actionMicrofinanceshgs() { $this->render('categorypage', array("name" => "Micro Finance (SHGs)", "pagename" => "micro-finance-shgs", "countno" => "1")); }public function actionMicrosmallandmediumenterprises() { $this->render('categorypage', array("name" => "Micro Small & Medium Enterprises", "pagename" => "micro-small-and-medium-enterprises", "countno" => "0")); }public function actionMigrantworkersandmigration() { $this->render('categorypage', array("name" => "Migrant workers and migration", "pagename" => "migrant-workers-and-migration", "countno" => "0")); }public function actionMinorityissues() { $this->render('categorypage', array("name" => "Minority Issues", "pagename" => "minority-issues", "countno" => "0")); }public function actionRenewableenergy() { $this->render('categorypage', array("name" => "New & Renewable Energy", "pagename" => "renewable-energy", "countno" => "0")); }public function actionPanchayatiraj() { $this->render('categorypage', array("name" => "Panchayati Raj", "pagename" => "panchayati-raj", "countno" => "0")); }public function actionPrisonersissues() { $this->render('categorypage', array("name" => "Prisoners Issues", "pagename" => "prisoners-issues", "countno" => "0")); }public function actionRighttoinformationandadvocacy() { $this->render('categorypage', array("name" => "Right to Information & Advocacy", "pagename" => "right-to-information-and-advocacy", "countno" => "0")); }public function actionRoadsafety() { $this->render('categorypage', array("name" => "Road safety", "pagename" => "road-safety", "countno" => "0")); }public function actionRuraldevelopmentandpovertyalleviation() { $this->render('categorypage', array("name" => "Rural Development & Poverty Alleviation", "pagename" => "rural-development-and-poverty-alleviation", "countno" => "0")); }public function actionScienceandtechnology() { $this->render('categorypage', array("name" => "Science & Technology", "pagename" => "science-and-technology", "countno" => "0")); }public function actionScientificandindustrialresearch() { $this->render('categorypage', array("name" => "Scientific & Industrial Research", "pagename" => "scientific-and-industrial-research", "countno" => "0")); }public function actionSports() { $this->render('categorypage', array("name" => "Sports", "pagename" => "sports", "countno" => "0")); }public function actionTribalwelfare() { $this->render('categorypage', array("name" => "Tribal Welfare", "pagename" => "tribal-welfare", "countno" => "1")); }public function actionUrbandevelopmentandpovertyalleviation() { $this->render('categorypage', array("name" => "Urban Development & Poverty Alleviation", "pagename" => "urban-development-and-poverty-alleviation", "countno" => "0")); }public function actionVocationaltraining() { $this->render('categorypage', array("name" => "Vocational Training", "pagename" => "vocational-training", "countno" => "0")); }public function actionWaterandsanitation() { $this->render('categorypage', array("name" => "Water and Sanitation", "pagename" => "water-and-sanitation", "countno" => "0")); }public function actionWomensdevelopmentandempowerment() { $this->render('categorypage', array("name" => "Womens Development & Empowerment", "pagename" => "womens-development-and-empowerment", "countno" => "0")); }public function actionYouthaffairs() { $this->render('categorypage', array("name" => "Youth Affairs", "pagename" => "youth-affairs", "countno" => "0")); }}
#12
+
 /home3/searchdo/public_html/index.php(11): CApplication->run()
06 $yii = dirname(__FILE__) . '/beta_thora_bachke_rahna/kya_hal_hai_beta/framework/yii.php';
07         $config = dirname(__FILE__) . '/protected/config/main.php';
08         defined('YII_DEBUG') or define('YII_DEBUG', TRUE);
09         defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 0);
10         require_once($yii);
11         Yii::createWebApplication($config)->run(); 
12         ?>
2025-05-01 07:52:19 Apache Yii Framework/1.1.10