PHP warning

number_format() expects parameter 1 to be double, string given

/home/fixtoysn/domains/fixtoys.net/public_html/protected/views/products/view.php(116)

104                         if ($list->price && $list->price_nomal) {
105                             echo '<div class="row">';
106                             echo '<div class="col-md-2 fnt-16"><strong class="text-red">ราคา</strong></div>';
107                             echo '<div class="col-md-10 fnt-16"><strong class="text-red">' . number_format($list->price, 2) . ' บาท</strong></div>';
108                             echo '<div class="col-md-2 text-muted">ราคา</div>';
109                             echo '<div class="col-md-10 text-muted"><s>' . number_format($list->price_nomal, 2) . ' บาท</s></div>';
110                             $price_item = $list->price;
111                             echo '</div>';
112                         } else if ($list->price) {
113                             echo '<p class=" text-danger"><strong>ราคา ' . number_format($list->price, 2) . ' บาท</strong></p>';
114                             $price_item = $list->price;
115                         } else {
116                             echo '<p class=""><strong>ราคา ' . number_format($list->price, 2) . ' บาท</strong></p>';
117                             $price_item = $list->price;
118                         }
119                         ?>
120                         <p>&nbsp;</p>
121                         <p>&nbsp;</p>
122                         <?php if (empty($colors) && empty($sizes)): ?>
123                             <div class="row">
124                                 <div class="col-md-12">
125                                     <table class="table table-condensed">
126                                         <tr class="size-list size-1002">
127                                             <td style="vertical-align:middle;">ราคา</td>
128                                             <td style="vertical-align:middle;"><?php echo number_format($price_item, 2); ?> บาท</td>

Stack Trace

#0
+
 /home/fixtoysn/domains/fixtoys.net/public_html/protected/views/products/view.php(116): number_format("", 2)
111                             echo '</div>';
112                         } else if ($list->price) {
113                             echo '<p class=" text-danger"><strong>ราคา ' . number_format($list->price, 2) . ' บาท</strong></p>';
114                             $price_item = $list->price;
115                         } else {
116                             echo '<p class=""><strong>ราคา ' . number_format($list->price, 2) . ' บาท</strong></p>';
117                             $price_item = $list->price;
118                         }
119                         ?>
120                         <p>&nbsp;</p>
121                         <p>&nbsp;</p>
#5
+
 /home/fixtoysn/domains/fixtoys.net/public_html/protected/controllers/ProductsController.php(432): CController->render()
427             'findCatIds' => $findCatIds,
428             'colors' => $colors,
429             'sizes' => $sizes
430         );
431 
432         $this->render('view', $array);
433     }
434 }
#15
+
 /home/fixtoysn/domains/fixtoys.net/public_html/index.php(14): CApplication->run()
09 defined('YII_DEBUG') or define('YII_DEBUG',TRUE);
10 // specify how many levels of call stack should be shown in each log message
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
12 
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
15  
2024-03-29 03:08:12 Apache/2 Yii Framework/1.1.15