Skip to content

Commit 60ca6c7

Browse files
committed
Very Minor Tweak
1 parent 8249cbd commit 60ca6c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpSpreadsheet/Cell/Cell.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,12 @@ public function setValueExplicit(mixed $value, string $dataType = DataType::TYPE
320320
self::updateIfCellIsTableHeader($this->getParent()?->getParent(), $this, $oldValue, $value);
321321
$worksheet = $this->getWorksheet();
322322
$spreadsheet = $worksheet->getParent();
323-
$originalSelected = $worksheet->getSelectedCells();
324323
if (isset($spreadsheet)) {
324+
$originalSelected = $worksheet->getSelectedCells();
325325
$activeSheetIndex = $spreadsheet->getActiveSheetIndex();
326326
$style = $this->getStyle();
327327
$oldQuotePrefix = $style->getQuotePrefix();
328-
if ($oldQuotePrefix != $quotePrefix) {
328+
if ($oldQuotePrefix !== $quotePrefix) {
329329
$style->setQuotePrefix($quotePrefix);
330330
}
331331
$worksheet->setSelectedCells($originalSelected);

0 commit comments

Comments
 (0)